amp 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. data/.gitignore +12 -0
  2. data/.hgignore +3 -0
  3. data/AUTHORS +1 -1
  4. data/Manifest.txt +99 -38
  5. data/README.md +3 -3
  6. data/Rakefile +53 -18
  7. data/SCHEDULE.markdown +5 -1
  8. data/TODO.markdown +120 -149
  9. data/ampfile.rb +3 -1
  10. data/bin/amp +4 -1
  11. data/ext/amp/bz2/extconf.rb +1 -1
  12. data/ext/amp/mercurial_patch/extconf.rb +1 -1
  13. data/ext/amp/mercurial_patch/mpatch.c +4 -3
  14. data/ext/amp/priority_queue/extconf.rb +1 -1
  15. data/ext/amp/support/extconf.rb +1 -1
  16. data/ext/amp/support/support.c +1 -1
  17. data/lib/amp.rb +125 -67
  18. data/lib/amp/commands/command.rb +12 -10
  19. data/lib/amp/commands/command_support.rb +8 -1
  20. data/lib/amp/commands/commands/help.rb +2 -20
  21. data/lib/amp/commands/commands/init.rb +14 -2
  22. data/lib/amp/commands/commands/templates.rb +6 -4
  23. data/lib/amp/commands/commands/version.rb +15 -1
  24. data/lib/amp/commands/commands/workflow.rb +3 -3
  25. data/lib/amp/commands/commands/workflows/git/add.rb +3 -3
  26. data/lib/amp/commands/commands/workflows/git/copy.rb +1 -1
  27. data/lib/amp/commands/commands/workflows/git/rm.rb +4 -2
  28. data/lib/amp/commands/commands/workflows/hg/add.rb +1 -1
  29. data/lib/amp/commands/commands/workflows/hg/addremove.rb +2 -2
  30. data/lib/amp/commands/commands/workflows/hg/annotate.rb +8 -2
  31. data/lib/amp/commands/commands/workflows/hg/bisect.rb +253 -0
  32. data/lib/amp/commands/commands/workflows/hg/branch.rb +1 -1
  33. data/lib/amp/commands/commands/workflows/hg/branches.rb +3 -3
  34. data/lib/amp/commands/commands/workflows/hg/bundle.rb +3 -3
  35. data/lib/amp/commands/commands/workflows/hg/clone.rb +4 -5
  36. data/lib/amp/commands/commands/workflows/hg/commit.rb +37 -1
  37. data/lib/amp/commands/commands/workflows/hg/copy.rb +2 -1
  38. data/lib/amp/commands/commands/workflows/hg/debug/index.rb +1 -1
  39. data/lib/amp/commands/commands/workflows/hg/diff.rb +3 -8
  40. data/lib/amp/commands/commands/workflows/hg/forget.rb +5 -4
  41. data/lib/amp/commands/commands/workflows/hg/identify.rb +6 -6
  42. data/lib/amp/commands/commands/workflows/hg/import.rb +1 -1
  43. data/lib/amp/commands/commands/workflows/hg/incoming.rb +2 -2
  44. data/lib/amp/commands/commands/workflows/hg/log.rb +5 -4
  45. data/lib/amp/commands/commands/workflows/hg/merge.rb +1 -1
  46. data/lib/amp/commands/commands/workflows/hg/move.rb +5 -3
  47. data/lib/amp/commands/commands/workflows/hg/outgoing.rb +1 -1
  48. data/lib/amp/commands/commands/workflows/hg/push.rb +6 -7
  49. data/lib/amp/commands/commands/workflows/hg/remove.rb +2 -2
  50. data/lib/amp/commands/commands/workflows/hg/resolve.rb +6 -23
  51. data/lib/amp/commands/commands/workflows/hg/root.rb +1 -2
  52. data/lib/amp/commands/commands/workflows/hg/status.rb +21 -12
  53. data/lib/amp/commands/commands/workflows/hg/tag.rb +2 -2
  54. data/lib/amp/commands/commands/workflows/hg/untrack.rb +12 -0
  55. data/lib/amp/commands/commands/workflows/hg/verify.rb +13 -3
  56. data/lib/amp/commands/commands/workflows/hg/what_changed.rb +18 -0
  57. data/lib/amp/commands/dispatch.rb +12 -13
  58. data/lib/amp/dependencies/amp_support.rb +1 -1
  59. data/lib/amp/dependencies/amp_support/ruby_amp_support.rb +1 -0
  60. data/lib/amp/dependencies/maruku.rb +136 -0
  61. data/lib/amp/dependencies/maruku/attributes.rb +227 -0
  62. data/lib/amp/dependencies/maruku/defaults.rb +71 -0
  63. data/lib/amp/dependencies/maruku/errors_management.rb +92 -0
  64. data/lib/amp/dependencies/maruku/helpers.rb +260 -0
  65. data/lib/amp/dependencies/maruku/input/charsource.rb +326 -0
  66. data/lib/amp/dependencies/maruku/input/extensions.rb +69 -0
  67. data/lib/amp/dependencies/maruku/input/html_helper.rb +189 -0
  68. data/lib/amp/dependencies/maruku/input/linesource.rb +111 -0
  69. data/lib/amp/dependencies/maruku/input/parse_block.rb +615 -0
  70. data/lib/amp/dependencies/maruku/input/parse_doc.rb +234 -0
  71. data/lib/amp/dependencies/maruku/input/parse_span_better.rb +746 -0
  72. data/lib/amp/dependencies/maruku/input/rubypants.rb +225 -0
  73. data/lib/amp/dependencies/maruku/input/type_detection.rb +147 -0
  74. data/lib/amp/dependencies/maruku/input_textile2/t2_parser.rb +163 -0
  75. data/lib/amp/dependencies/maruku/maruku.rb +33 -0
  76. data/lib/amp/dependencies/maruku/output/to_ansi.rb +223 -0
  77. data/lib/amp/dependencies/maruku/output/to_html.rb +991 -0
  78. data/lib/amp/dependencies/maruku/output/to_markdown.rb +164 -0
  79. data/lib/amp/dependencies/maruku/output/to_s.rb +56 -0
  80. data/lib/amp/dependencies/maruku/string_utils.rb +191 -0
  81. data/lib/amp/dependencies/maruku/structures.rb +167 -0
  82. data/lib/amp/dependencies/maruku/structures_inspect.rb +87 -0
  83. data/lib/amp/dependencies/maruku/structures_iterators.rb +61 -0
  84. data/lib/amp/dependencies/maruku/textile2.rb +1 -0
  85. data/lib/amp/dependencies/maruku/toc.rb +199 -0
  86. data/lib/amp/dependencies/maruku/usage/example1.rb +33 -0
  87. data/lib/amp/dependencies/maruku/version.rb +40 -0
  88. data/lib/amp/dependencies/priority_queue.rb +2 -1
  89. data/lib/amp/dependencies/python_config.rb +2 -1
  90. data/lib/amp/graphs/ancestor.rb +2 -1
  91. data/lib/amp/graphs/copies.rb +236 -233
  92. data/lib/amp/help/entries/__default__.erb +31 -0
  93. data/lib/amp/help/entries/commands.erb +6 -0
  94. data/lib/amp/help/entries/mdtest.md +35 -0
  95. data/lib/amp/help/entries/silly +3 -0
  96. data/lib/amp/help/help.rb +288 -0
  97. data/lib/amp/profiling_hacks.rb +5 -3
  98. data/lib/amp/repository/abstract/abstract_changeset.rb +97 -0
  99. data/lib/amp/repository/abstract/abstract_local_repo.rb +181 -0
  100. data/lib/amp/repository/abstract/abstract_staging_area.rb +180 -0
  101. data/lib/amp/repository/abstract/abstract_versioned_file.rb +100 -0
  102. data/lib/amp/repository/abstract/common_methods/changeset.rb +75 -0
  103. data/lib/amp/repository/abstract/common_methods/local_repo.rb +277 -0
  104. data/lib/amp/repository/abstract/common_methods/staging_area.rb +233 -0
  105. data/lib/amp/repository/abstract/common_methods/versioned_file.rb +71 -0
  106. data/lib/amp/repository/generic_repo_picker.rb +78 -0
  107. data/lib/amp/repository/git/repo_format/changeset.rb +336 -0
  108. data/lib/amp/repository/git/repo_format/staging_area.rb +192 -0
  109. data/lib/amp/repository/git/repo_format/versioned_file.rb +119 -0
  110. data/lib/amp/repository/git/repositories/local_repository.rb +164 -0
  111. data/lib/amp/repository/git/repository.rb +41 -0
  112. data/lib/amp/repository/mercurial/encoding/mercurial_diff.rb +382 -0
  113. data/lib/amp/repository/mercurial/encoding/mercurial_patch.rb +1 -0
  114. data/lib/amp/repository/mercurial/encoding/patch.rb +294 -0
  115. data/lib/amp/repository/mercurial/encoding/pure_ruby/ruby_mercurial_patch.rb +124 -0
  116. data/lib/amp/repository/mercurial/merging/merge_ui.rb +327 -0
  117. data/lib/amp/repository/mercurial/merging/simple_merge.rb +452 -0
  118. data/lib/amp/repository/mercurial/repo_format/branch_manager.rb +266 -0
  119. data/lib/amp/repository/mercurial/repo_format/changeset.rb +768 -0
  120. data/lib/amp/repository/mercurial/repo_format/dir_state.rb +716 -0
  121. data/lib/amp/repository/mercurial/repo_format/journal.rb +218 -0
  122. data/lib/amp/repository/mercurial/repo_format/lock.rb +210 -0
  123. data/lib/amp/repository/mercurial/repo_format/merge_state.rb +228 -0
  124. data/lib/amp/repository/mercurial/repo_format/staging_area.rb +367 -0
  125. data/lib/amp/repository/mercurial/repo_format/store.rb +487 -0
  126. data/lib/amp/repository/mercurial/repo_format/tag_manager.rb +322 -0
  127. data/lib/amp/repository/mercurial/repo_format/updatable.rb +543 -0
  128. data/lib/amp/repository/mercurial/repo_format/updater.rb +848 -0
  129. data/lib/amp/repository/mercurial/repo_format/verification.rb +433 -0
  130. data/lib/amp/repository/mercurial/repositories/bundle_repository.rb +216 -0
  131. data/lib/amp/repository/mercurial/repositories/http_repository.rb +386 -0
  132. data/lib/amp/repository/mercurial/repositories/local_repository.rb +2034 -0
  133. data/lib/amp/repository/mercurial/repository.rb +119 -0
  134. data/lib/amp/repository/mercurial/revlogs/bundle_revlogs.rb +249 -0
  135. data/lib/amp/repository/mercurial/revlogs/changegroup.rb +217 -0
  136. data/lib/amp/repository/mercurial/revlogs/changelog.rb +339 -0
  137. data/lib/amp/repository/mercurial/revlogs/file_log.rb +152 -0
  138. data/lib/amp/repository/mercurial/revlogs/index.rb +500 -0
  139. data/lib/amp/repository/mercurial/revlogs/manifest.rb +201 -0
  140. data/lib/amp/repository/mercurial/revlogs/node.rb +20 -0
  141. data/lib/amp/repository/mercurial/revlogs/revlog.rb +1026 -0
  142. data/lib/amp/repository/mercurial/revlogs/revlog_support.rb +129 -0
  143. data/lib/amp/repository/mercurial/revlogs/versioned_file.rb +597 -0
  144. data/lib/amp/repository/repository.rb +11 -88
  145. data/lib/amp/server/extension/amp_extension.rb +3 -3
  146. data/lib/amp/server/fancy_http_server.rb +1 -1
  147. data/lib/amp/server/fancy_views/_browser.haml +1 -1
  148. data/lib/amp/server/fancy_views/_diff_file.haml +1 -8
  149. data/lib/amp/server/fancy_views/changeset.haml +2 -2
  150. data/lib/amp/server/fancy_views/file.haml +1 -1
  151. data/lib/amp/server/fancy_views/file_diff.haml +1 -1
  152. data/lib/amp/support/amp_ui.rb +13 -29
  153. data/lib/amp/support/generator.rb +1 -1
  154. data/lib/amp/support/loaders.rb +1 -2
  155. data/lib/amp/support/logger.rb +10 -16
  156. data/lib/amp/support/match.rb +18 -4
  157. data/lib/amp/support/mercurial/ignore.rb +151 -0
  158. data/lib/amp/support/openers.rb +8 -3
  159. data/lib/amp/support/support.rb +91 -46
  160. data/lib/amp/templates/{blank.commit.erb → mercurial/blank.commit.erb} +0 -0
  161. data/lib/amp/templates/{blank.log.erb → mercurial/blank.log.erb} +0 -0
  162. data/lib/amp/templates/{default.commit.erb → mercurial/default.commit.erb} +0 -0
  163. data/lib/amp/templates/{default.log.erb → mercurial/default.log.erb} +0 -0
  164. data/lib/amp/templates/template.rb +18 -18
  165. data/man/amp.1 +51 -0
  166. data/site/src/about/commands.haml +1 -1
  167. data/site/src/css/amp.css +1 -1
  168. data/site/src/index.haml +3 -3
  169. data/tasks/man.rake +39 -0
  170. data/tasks/stats.rake +1 -10
  171. data/tasks/yard.rake +1 -50
  172. data/test/dirstate_tests/test_dir_state.rb +10 -8
  173. data/test/functional_tests/annotate.out +31 -0
  174. data/test/functional_tests/test_functional.rb +155 -63
  175. data/test/localrepo_tests/ampfile.rb +12 -0
  176. data/test/localrepo_tests/test_local_repo.rb +56 -57
  177. data/test/manifest_tests/test_manifest.rb +3 -5
  178. data/test/merge_tests/test_merge.rb +3 -3
  179. data/test/revlog_tests/test_revlog.rb +14 -6
  180. data/test/store_tests/test_fncache_store.rb +19 -19
  181. data/test/test_19_compatibility.rb +46 -0
  182. data/test/test_base85.rb +2 -2
  183. data/test/test_bdiff.rb +2 -2
  184. data/test/test_changegroup.rb +59 -0
  185. data/test/test_commands.rb +2 -2
  186. data/test/test_difflib.rb +2 -2
  187. data/test/test_generator.rb +34 -0
  188. data/test/test_ignore.rb +203 -0
  189. data/test/test_journal.rb +18 -13
  190. data/test/test_match.rb +2 -2
  191. data/test/test_mdiff.rb +3 -3
  192. data/test/test_mpatch.rb +3 -3
  193. data/test/test_multi_io.rb +40 -0
  194. data/test/test_support.rb +18 -2
  195. data/test/test_templates.rb +38 -0
  196. data/test/test_ui.rb +79 -0
  197. data/test/testutilities.rb +56 -0
  198. metadata +168 -49
  199. data/ext/amp/bz2/mkmf.log +0 -38
  200. data/lib/amp/encoding/mercurial_diff.rb +0 -378
  201. data/lib/amp/encoding/mercurial_patch.rb +0 -1
  202. data/lib/amp/encoding/patch.rb +0 -292
  203. data/lib/amp/encoding/pure_ruby/ruby_mercurial_patch.rb +0 -123
  204. data/lib/amp/merges/merge_state.rb +0 -164
  205. data/lib/amp/merges/merge_ui.rb +0 -322
  206. data/lib/amp/merges/simple_merge.rb +0 -450
  207. data/lib/amp/repository/branch_manager.rb +0 -234
  208. data/lib/amp/repository/dir_state.rb +0 -950
  209. data/lib/amp/repository/journal.rb +0 -203
  210. data/lib/amp/repository/lock.rb +0 -207
  211. data/lib/amp/repository/repositories/bundle_repository.rb +0 -214
  212. data/lib/amp/repository/repositories/http_repository.rb +0 -377
  213. data/lib/amp/repository/repositories/local_repository.rb +0 -2661
  214. data/lib/amp/repository/store.rb +0 -485
  215. data/lib/amp/repository/tag_manager.rb +0 -319
  216. data/lib/amp/repository/updatable.rb +0 -532
  217. data/lib/amp/repository/verification.rb +0 -431
  218. data/lib/amp/repository/versioned_file.rb +0 -475
  219. data/lib/amp/revlogs/bundle_revlogs.rb +0 -246
  220. data/lib/amp/revlogs/changegroup.rb +0 -217
  221. data/lib/amp/revlogs/changelog.rb +0 -338
  222. data/lib/amp/revlogs/changeset.rb +0 -521
  223. data/lib/amp/revlogs/file_log.rb +0 -165
  224. data/lib/amp/revlogs/index.rb +0 -493
  225. data/lib/amp/revlogs/manifest.rb +0 -195
  226. data/lib/amp/revlogs/node.rb +0 -18
  227. data/lib/amp/revlogs/revlog.rb +0 -1045
  228. data/lib/amp/revlogs/revlog_support.rb +0 -126
  229. data/lib/amp/support/ignore.rb +0 -144
  230. data/site/Rakefile +0 -38
  231. data/test/test_amp.rb +0 -9
  232. data/test/test_helper.rb +0 -15
data/.gitignore CHANGED
@@ -1 +1,13 @@
1
+ coverage*
1
2
  .hg/*
3
+ ext/amp/*/*.bundle
4
+ ext/amp/*/*.o
5
+ ext/amp/*/Makefile
6
+ test/localrepo_tests/testrepo/
7
+ test/merge_tests/local.txt.out
8
+ test/store_tests/store/
9
+ doc/
10
+ ext/amp/bz2/mkmf.log
11
+ pkg/
12
+ site/build/
13
+ .yardoc
data/.hgignore CHANGED
@@ -1,6 +1,8 @@
1
1
  syntax: glob
2
2
  .git/*
3
3
  doc/*
4
+ coverage/*
5
+ coverage.info
4
6
  .idea/*
5
7
  .yardoc
6
8
  test/store_tests/store/*
@@ -22,5 +24,6 @@ amp_serve_users.db
22
24
  pkg/*
23
25
  site/build/*
24
26
  site/src/doc*
27
+ ext/amp/bz2/mkmf.log
25
28
  syntax: regexp
26
29
  \.DS_Store
data/AUTHORS CHANGED
@@ -1,2 +1,2 @@
1
1
  Ari Brown
2
- Michael Edgar
2
+ Michael Edgar
@@ -16,7 +16,6 @@ bin/amp1.9
16
16
  ext/amp/bz2/README.txt
17
17
  ext/amp/bz2/bz2.c
18
18
  ext/amp/bz2/extconf.rb
19
- ext/amp/bz2/mkmf.log
20
19
  ext/amp/mercurial_patch/extconf.rb
21
20
  ext/amp/mercurial_patch/mpatch.c
22
21
  ext/amp/priority_queue/extconf.rb
@@ -40,6 +39,7 @@ lib/amp/commands/commands/workflows/hg/add.rb
40
39
  lib/amp/commands/commands/workflows/hg/addremove.rb
41
40
  lib/amp/commands/commands/workflows/hg/annotate.rb
42
41
  lib/amp/commands/commands/workflows/hg/archive.rb
42
+ lib/amp/commands/commands/workflows/hg/bisect.rb
43
43
  lib/amp/commands/commands/workflows/hg/branch.rb
44
44
  lib/amp/commands/commands/workflows/hg/branches.rb
45
45
  lib/amp/commands/commands/workflows/hg/bundle.rb
@@ -72,13 +72,43 @@ lib/amp/commands/commands/workflows/hg/status.rb
72
72
  lib/amp/commands/commands/workflows/hg/tag.rb
73
73
  lib/amp/commands/commands/workflows/hg/tags.rb
74
74
  lib/amp/commands/commands/workflows/hg/tip.rb
75
+ lib/amp/commands/commands/workflows/hg/untrack.rb
75
76
  lib/amp/commands/commands/workflows/hg/update.rb
76
77
  lib/amp/commands/commands/workflows/hg/verify.rb
77
78
  lib/amp/commands/commands/workflows/hg/view.rb
79
+ lib/amp/commands/commands/workflows/hg/what_changed.rb
78
80
  lib/amp/commands/dispatch.rb
79
81
  lib/amp/commands/hooks.rb
80
82
  lib/amp/dependencies/amp_support.rb
81
83
  lib/amp/dependencies/amp_support/ruby_amp_support.rb
84
+ lib/amp/dependencies/maruku.rb
85
+ lib/amp/dependencies/maruku/attributes.rb
86
+ lib/amp/dependencies/maruku/defaults.rb
87
+ lib/amp/dependencies/maruku/errors_management.rb
88
+ lib/amp/dependencies/maruku/helpers.rb
89
+ lib/amp/dependencies/maruku/input/charsource.rb
90
+ lib/amp/dependencies/maruku/input/extensions.rb
91
+ lib/amp/dependencies/maruku/input/html_helper.rb
92
+ lib/amp/dependencies/maruku/input/linesource.rb
93
+ lib/amp/dependencies/maruku/input/parse_block.rb
94
+ lib/amp/dependencies/maruku/input/parse_doc.rb
95
+ lib/amp/dependencies/maruku/input/parse_span_better.rb
96
+ lib/amp/dependencies/maruku/input/rubypants.rb
97
+ lib/amp/dependencies/maruku/input/type_detection.rb
98
+ lib/amp/dependencies/maruku/input_textile2/t2_parser.rb
99
+ lib/amp/dependencies/maruku/maruku.rb
100
+ lib/amp/dependencies/maruku/output/to_ansi.rb
101
+ lib/amp/dependencies/maruku/output/to_html.rb
102
+ lib/amp/dependencies/maruku/output/to_markdown.rb
103
+ lib/amp/dependencies/maruku/output/to_s.rb
104
+ lib/amp/dependencies/maruku/string_utils.rb
105
+ lib/amp/dependencies/maruku/structures.rb
106
+ lib/amp/dependencies/maruku/structures_inspect.rb
107
+ lib/amp/dependencies/maruku/structures_iterators.rb
108
+ lib/amp/dependencies/maruku/textile2.rb
109
+ lib/amp/dependencies/maruku/toc.rb
110
+ lib/amp/dependencies/maruku/usage/example1.rb
111
+ lib/amp/dependencies/maruku/version.rb
82
112
  lib/amp/dependencies/minitar.rb
83
113
  lib/amp/dependencies/priority_queue.rb
84
114
  lib/amp/dependencies/priority_queue/c_priority_queue.rb
@@ -95,41 +125,63 @@ lib/amp/dependencies/zip/ziprequire.rb
95
125
  lib/amp/encoding/base85.rb
96
126
  lib/amp/encoding/binary_diff.rb
97
127
  lib/amp/encoding/difflib.rb
98
- lib/amp/encoding/mercurial_diff.rb
99
- lib/amp/encoding/mercurial_patch.rb
100
- lib/amp/encoding/patch.rb
101
- lib/amp/encoding/pure_ruby/ruby_mercurial_patch.rb
102
128
  lib/amp/extensions/ditz.rb
103
129
  lib/amp/extensions/lighthouse.rb
104
130
  lib/amp/graphs/ancestor.rb
105
131
  lib/amp/graphs/copies.rb
106
- lib/amp/merges/merge_state.rb
107
- lib/amp/merges/merge_ui.rb
108
- lib/amp/merges/simple_merge.rb
132
+ lib/amp/help/entries/__default__.erb
133
+ lib/amp/help/entries/commands.erb
134
+ lib/amp/help/entries/mdtest.md
135
+ lib/amp/help/entries/silly
136
+ lib/amp/help/help.rb
109
137
  lib/amp/profiling_hacks.rb
110
- lib/amp/repository/branch_manager.rb
111
- lib/amp/repository/dir_state.rb
112
- lib/amp/repository/journal.rb
113
- lib/amp/repository/lock.rb
114
- lib/amp/repository/repositories/bundle_repository.rb
115
- lib/amp/repository/repositories/http_repository.rb
116
- lib/amp/repository/repositories/local_repository.rb
138
+ lib/amp/repository/abstract/abstract_changeset.rb
139
+ lib/amp/repository/abstract/abstract_local_repo.rb
140
+ lib/amp/repository/abstract/abstract_staging_area.rb
141
+ lib/amp/repository/abstract/abstract_versioned_file.rb
142
+ lib/amp/repository/abstract/common_methods/changeset.rb
143
+ lib/amp/repository/abstract/common_methods/local_repo.rb
144
+ lib/amp/repository/abstract/common_methods/staging_area.rb
145
+ lib/amp/repository/abstract/common_methods/versioned_file.rb
146
+ lib/amp/repository/generic_repo_picker.rb
147
+ lib/amp/repository/git/repo_format/changeset.rb
148
+ lib/amp/repository/git/repo_format/staging_area.rb
149
+ lib/amp/repository/git/repo_format/versioned_file.rb
150
+ lib/amp/repository/git/repositories/local_repository.rb
151
+ lib/amp/repository/git/repository.rb
152
+ lib/amp/repository/mercurial/encoding/mercurial_diff.rb
153
+ lib/amp/repository/mercurial/encoding/mercurial_patch.rb
154
+ lib/amp/repository/mercurial/encoding/patch.rb
155
+ lib/amp/repository/mercurial/encoding/pure_ruby/ruby_mercurial_patch.rb
156
+ lib/amp/repository/mercurial/merging/merge_ui.rb
157
+ lib/amp/repository/mercurial/merging/simple_merge.rb
158
+ lib/amp/repository/mercurial/repo_format/branch_manager.rb
159
+ lib/amp/repository/mercurial/repo_format/changeset.rb
160
+ lib/amp/repository/mercurial/repo_format/dir_state.rb
161
+ lib/amp/repository/mercurial/repo_format/journal.rb
162
+ lib/amp/repository/mercurial/repo_format/lock.rb
163
+ lib/amp/repository/mercurial/repo_format/merge_state.rb
164
+ lib/amp/repository/mercurial/repo_format/staging_area.rb
165
+ lib/amp/repository/mercurial/repo_format/store.rb
166
+ lib/amp/repository/mercurial/repo_format/tag_manager.rb
167
+ lib/amp/repository/mercurial/repo_format/updatable.rb
168
+ lib/amp/repository/mercurial/repo_format/updater.rb
169
+ lib/amp/repository/mercurial/repo_format/verification.rb
170
+ lib/amp/repository/mercurial/repositories/bundle_repository.rb
171
+ lib/amp/repository/mercurial/repositories/http_repository.rb
172
+ lib/amp/repository/mercurial/repositories/local_repository.rb
173
+ lib/amp/repository/mercurial/repository.rb
174
+ lib/amp/repository/mercurial/revlogs/bundle_revlogs.rb
175
+ lib/amp/repository/mercurial/revlogs/changegroup.rb
176
+ lib/amp/repository/mercurial/revlogs/changelog.rb
177
+ lib/amp/repository/mercurial/revlogs/file_log.rb
178
+ lib/amp/repository/mercurial/revlogs/index.rb
179
+ lib/amp/repository/mercurial/revlogs/manifest.rb
180
+ lib/amp/repository/mercurial/revlogs/node.rb
181
+ lib/amp/repository/mercurial/revlogs/revlog.rb
182
+ lib/amp/repository/mercurial/revlogs/revlog_support.rb
183
+ lib/amp/repository/mercurial/revlogs/versioned_file.rb
117
184
  lib/amp/repository/repository.rb
118
- lib/amp/repository/store.rb
119
- lib/amp/repository/tag_manager.rb
120
- lib/amp/repository/updatable.rb
121
- lib/amp/repository/verification.rb
122
- lib/amp/repository/versioned_file.rb
123
- lib/amp/revlogs/bundle_revlogs.rb
124
- lib/amp/revlogs/changegroup.rb
125
- lib/amp/revlogs/changelog.rb
126
- lib/amp/revlogs/changeset.rb
127
- lib/amp/revlogs/file_log.rb
128
- lib/amp/revlogs/index.rb
129
- lib/amp/revlogs/manifest.rb
130
- lib/amp/revlogs/node.rb
131
- lib/amp/revlogs/revlog.rb
132
- lib/amp/revlogs/revlog_support.rb
133
185
  lib/amp/server/amp_user.rb
134
186
  lib/amp/server/extension/amp_extension.rb
135
187
  lib/amp/server/extension/authorization.rb
@@ -151,20 +203,20 @@ lib/amp/support/amp_config.rb
151
203
  lib/amp/support/amp_ui.rb
152
204
  lib/amp/support/docs.rb
153
205
  lib/amp/support/generator.rb
154
- lib/amp/support/ignore.rb
155
206
  lib/amp/support/loaders.rb
156
207
  lib/amp/support/logger.rb
157
208
  lib/amp/support/match.rb
209
+ lib/amp/support/mercurial/ignore.rb
158
210
  lib/amp/support/multi_io.rb
159
211
  lib/amp/support/openers.rb
160
212
  lib/amp/support/ruby_19_compatibility.rb
161
213
  lib/amp/support/support.rb
162
- lib/amp/templates/blank.commit.erb
163
- lib/amp/templates/blank.log.erb
164
- lib/amp/templates/default.commit.erb
165
- lib/amp/templates/default.log.erb
214
+ lib/amp/templates/mercurial/blank.commit.erb
215
+ lib/amp/templates/mercurial/blank.log.erb
216
+ lib/amp/templates/mercurial/default.commit.erb
217
+ lib/amp/templates/mercurial/default.log.erb
166
218
  lib/amp/templates/template.rb
167
- site/Rakefile
219
+ man/amp.1
168
220
  site/src/about/ampfile.haml
169
221
  site/src/about/commands.haml
170
222
  site/src/about/index.haml
@@ -211,11 +263,13 @@ site/src/index.haml
211
263
  site/src/learn/index.haml
212
264
  site/src/scripts/jquery-1.3.2.min.js
213
265
  site/src/scripts/jquery.cookie.js
266
+ tasks/man.rake
214
267
  tasks/stats.rake
215
268
  tasks/yard.rake
216
269
  test/dirstate_tests/dirstate
217
270
  test/dirstate_tests/hgrc
218
271
  test/dirstate_tests/test_dir_state.rb
272
+ test/functional_tests/annotate.out
219
273
  test/functional_tests/resources/.hgignore
220
274
  test/functional_tests/resources/STYLE.txt
221
275
  test/functional_tests/resources/command.rb
@@ -265,6 +319,7 @@ test/functional_tests/resources/version5_2/commands/newz.rb
265
319
  test/functional_tests/resources/version5_2/commands/stats.rb
266
320
  test/functional_tests/resources/version5_2/commands/status.rb
267
321
  test/functional_tests/test_functional.rb
322
+ test/localrepo_tests/ampfile.rb
268
323
  test/localrepo_tests/test_local_repo.rb
269
324
  test/localrepo_tests/testrepo.tar.gz
270
325
  test/manifest_tests/00manifest.i
@@ -281,14 +336,20 @@ test/revlog_tests/test_revlog.rb
281
336
  test/revlog_tests/testindex.i
282
337
  test/store_tests/store.tar.gz
283
338
  test/store_tests/test_fncache_store.rb
284
- test/test_amp.rb
339
+ test/test_19_compatibility.rb
285
340
  test/test_base85.rb
286
341
  test/test_bdiff.rb
342
+ test/test_changegroup.rb
287
343
  test/test_commands.rb
288
344
  test/test_difflib.rb
289
- test/test_helper.rb
345
+ test/test_generator.rb
346
+ test/test_ignore.rb
290
347
  test/test_journal.rb
291
348
  test/test_match.rb
292
349
  test/test_mdiff.rb
293
350
  test/test_mpatch.rb
351
+ test/test_multi_io.rb
294
352
  test/test_support.rb
353
+ test/test_templates.rb
354
+ test/test_ui.rb
355
+ test/testutilities.rb
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Amp Release v0.5.1 (John Locke)
1
+ Amp Release v0.5.3 (John Locke)
2
2
  ==============================
3
3
 
4
4
  **Homepage**: [http://amp.carboni.ca](http://amp.carboni.ca)
@@ -6,7 +6,7 @@ Amp Release v0.5.1 (John Locke)
6
6
  **Git**: [http://github.com/michaeledgar/amp](http://github.com/michaeledgar/amp)
7
7
  **Mercurial**: [http://bitbucket.org/carbonica/amp](http://bitbucket.org/carbonica/amp)
8
8
  **Author**: Michael Edgar & Ari Brown
9
- **Copyright**: 2009
9
+ **Copyright**: 2009-2010
10
10
  **License**: GPLv2 (inherited from Mercurial)
11
11
 
12
12
 
@@ -74,7 +74,7 @@ ________
74
74
  % amp commit -m "leethaxness"
75
75
  % amp push
76
76
 
77
- Nothing really changes from using the hg command. There are a few differences
77
+ Nothing really changes from using the hg/git command. There are a few differences
78
78
  here and there (see `amp help [COMMAND]`), but really, it's pretty much the same.
79
79
 
80
80
  Using amp as a library:
data/Rakefile CHANGED
@@ -1,6 +1,5 @@
1
1
  # -*- ruby -*-
2
2
 
3
- require 'rubygems'
4
3
  require 'rake'
5
4
  require 'rake/tasklib'
6
5
  require 'rake/testtask'
@@ -21,18 +20,18 @@ def remove_task(*task_names)
21
20
  end
22
21
  end
23
22
 
24
-
23
+ Hoe.plugin :minitest
25
24
  Hoe.spec "amp" do
26
25
  developer "Michael Edgar", "adgar@carboni.ca"
27
26
  developer "Ari Brown", "seydar@carboni.ca"
28
27
  self.url = "http://amp.carboni.ca/"
29
28
  self.spec_extras = {:extensions => ["ext/amp/mercurial_patch/extconf.rb",
30
- "ext/amp/priority_queue/extconf.rb",
31
- "ext/amp/support/extconf.rb",
32
- "ext/amp/bz2/extconf.rb"]}
29
+ "ext/amp/priority_queue/extconf.rb",
30
+ "ext/amp/support/extconf.rb",
31
+ "ext/amp/bz2/extconf.rb"]}
33
32
  self.need_rdoc = false
34
- self.flog_threshold = 50000
35
33
  self.summary = "Version Control in Ruby. Mercurial Compatible. Big Ideas."
34
+ extra_dev_deps << ["rtfm", ">= 0.5.1"] << ["yard", ">= 0.4.0"] << ["minitest", ">= 1.5.0"]
36
35
  end
37
36
 
38
37
  # Hoe.spec "amp-pure" do
@@ -48,10 +47,11 @@ end
48
47
 
49
48
 
50
49
  remove_task 'test_deps', 'publish_docs', 'post_blog',
51
- 'deps:fetch', 'deps:list', 'deps:email', 'flay', 'clean', 'test'
50
+ 'deps:fetch', 'deps:list', 'deps:email', 'flay', 'clean', 'flog'
52
51
 
53
52
  load 'tasks/yard.rake'
54
53
  load 'tasks/stats.rake'
54
+ load 'tasks/man.rake'
55
55
 
56
56
  desc "Build the C extensions"
57
57
  task :build do
@@ -85,18 +85,53 @@ task :prepare do
85
85
  end
86
86
 
87
87
  # liberally modified from Hoe's
88
- desc 'Test the amp AWESOMENESS.'
89
- task :test do
90
- framework = "test/unit"
91
- test_globs = ['test/**/test_*.rb']
92
- ruby_flags = ENV['RUBY_FLAGS'] || "-w -I#{%w(lib ext bin test).join(File::PATH_SEPARATOR)}" +
93
- (ENV['RUBY_DEBUG'] ? " #{ENV['RUBY_DEBUG']}" : '')
94
- tests = [ framework] +
95
- test_globs.map { |g| Dir.glob(g) }.flatten
96
- tests.map! {|f| %(require "#{f}")}
97
- cmd = "#{ruby_flags} -e '$amp_testing = true; #{tests.join("; ")}' "
88
+ # desc 'Test the amp AWESOMENESS.'
89
+ # task :test do
90
+ # framework = "test/unit"
91
+ # test_globs = ['test/**/test_*.rb']
92
+ # ruby_flags = ENV['RUBY_FLAGS'] || "-w -I#{%w(lib ext bin test).join(File::PATH_SEPARATOR)}" +
93
+ # (ENV['RUBY_DEBUG'] ? " #{ENV['RUBY_DEBUG']}" : '')
94
+ # tests = [ framework] +
95
+ # test_globs.map { |g| Dir.glob(g) }.flatten
96
+ # tests.map! {|f| %(require "#{f}")}
97
+ # cmd = "#{ruby_flags} -e '$amp_testing = true; #{tests.join("; ")}' "
98
+ #
99
+ # ruby cmd
100
+ # end
101
+
102
+ desc "Compile Site"
103
+ task :"build-website" do
104
+ require 'site/src/helpers.rb'
105
+ load 'lib/amp.rb' # get the version
106
+ missing_gems = []
107
+ requirements = ['haml', 'uv']
108
+ requirements_install = ['haml', 'ultraviolet']
109
+ requirements.each do |requirement|
110
+ begin
111
+ require requirement
112
+ rescue LoadError => e
113
+ puts "The following gems are required to build the amp website: #{requirements.join(", ")}"
114
+ puts "Install them as follows: gem install #{requirements_install.join(" ")}"
115
+ puts "You will need oniguruma. Here's a helpful explanation of how to install it if"
116
+ puts "you need some help: http://snippets.aktagon.com/snippets/61-Installing-Ultraviolet-and-Onigurama"
117
+ exit
118
+ end
119
+ end
98
120
 
99
- ruby cmd
121
+ Dir["site/src/**/*.haml"].reject {|item| item.split("/").last =~ /^_/}.each do |haml|
122
+ file_path = haml[8..-6]
123
+ FileUtils.makedirs(File.dirname("site/build" + file_path + ".html"))
124
+ File.open("site/build" + file_path + ".html","w") do |out|
125
+ puts "Building #{file_path}"
126
+ out.write render(haml)
127
+ end
128
+ end
129
+ %w(css images scripts docs).each do |dir|
130
+ src = "site/src/#{dir}/"
131
+ if File.exist? src
132
+ sh "cp -r #{src} site/build/#{dir}/"
133
+ end
134
+ end
100
135
  end
101
136
 
102
137
  # vim: syntax=Ruby
@@ -9,4 +9,8 @@ release happens, use the next name on the list.
9
9
  - √ Charles Hieronymus Pace
10
10
  - John Locke
11
11
  - Christian Shephard
12
- - The Smoke Monster
12
+ - The Smoke Monster
13
+ - Suomen
14
+ - The word representing how some languages don't distinguish between blue and green
15
+ - Magyar
16
+ - Eagle Scout
@@ -1,149 +1,120 @@
1
- Amp::Patch::Patch
2
- =================
3
-
4
- Amp::Patch::Patch#hash\_lines
5
- -----------------------------
6
- -
7
-
8
- Amp::Patch::Patch#hash=
9
- -----------------------
10
- -
11
-
12
- Amp::Patch::Patch#find\_lines
13
- -----------------------------
14
- -
15
-
16
- Amp::Patch::Patch#hash
17
- ----------------------
18
- -
19
-
20
- Amp::Patch::Patch#hunks=
21
- ------------------------
22
- -
23
-
24
- Amp::Patch::Patch#hunks
25
- -----------------------
26
- -
27
-
28
- Amp::Patch::Patch#offset=
29
- -------------------------
30
- -
31
-
32
- Amp::Patch::Patch#lines=
33
- ------------------------
34
- -
35
-
36
- Amp::Patch::Patch#offset
37
- ------------------------
38
- -
39
-
40
- Amp::Patch::Patch#lines
41
- -----------------------
42
- -
43
-
44
-
45
- Amp::Support::Template
46
- ======================
47
-
48
- Amp::Support::Template#render
49
- -----------------------------
50
- -
51
-
52
-
53
- Amp::Repositories::HTTPRepository
54
- =================================
55
-
56
- Amp::Repositories::HTTPRepository#changegroup
57
- ---------------------------------------------
58
- -
59
-
60
-
61
- Amp::RevlogSupport::IndexInlineNG
62
- =================================
63
-
64
- Amp::RevlogSupport::IndexInlineNG#parse\_file
65
- ---------------------------------------------
66
- -
67
-
68
-
69
- File
70
- ====
71
-
72
- File.amp\_find\_executable
73
- --------------------------
74
- -
75
-
76
- File.amp\_set\_executable
77
- -------------------------
78
- -
79
-
80
- File.amp\_lookup\_reg
81
- ---------------------
82
- -
83
-
84
-
85
- Amp::Revlog
86
- ===========
87
-
88
- Amp::Revlog#check\_inline\_size
89
- -------------------------------
90
- -
91
- -
92
-
93
-
94
- Amp::ChangeLog
95
- ==============
96
-
97
- Amp::ChangeLog#add
98
- ------------------
99
- -
100
-
101
- Amp::ChangeLog#read
102
- -------------------
103
- -
104
-
105
-
106
- Amp::Repositories::DirState
107
- ===========================
108
-
109
- Amp::Repositories::DirState#normalize
110
- -------------------------------------
111
- -
112
-
113
- Amp::Repositories::DirState#write
114
- ---------------------------------
115
- -
116
-
117
-
118
- Amp::Repositories::LocalRepository
119
- ==================================
120
-
121
- Amp::Repositories::LocalRepository#push\_add\_changegroup
122
- ---------------------------------------------------------
123
- -
124
-
125
- Amp::Repositories::LocalRepository#push\_unbundle
126
- -------------------------------------------------
127
- -
128
-
129
- Amp::Repositories::Updatable#update
130
- -----------------------------------
131
- -
132
-
133
- Amp::Repositories::LocalRepository#changegroup\_info
134
- ----------------------------------------------------
135
- -
136
-
137
- Amp::Repositories::TagManager#read\_tags
138
- ----------------------------------------
139
- -
140
-
141
- Amp::Repositories::Updatable#apply\_updates
142
- -------------------------------------------
143
- -
144
-
145
- Amp::Repositories::LocalRepository#pre\_push
146
- --------------------------------------------
147
- -
148
-
149
-
1
+ Here are the things we'd like to do. If you're looking to help out, read on.
2
+ We have put them into several categories to trick^H^H^H^H^Hencourage you into
3
+ helping.
4
+
5
+ **RULE NUMBER 1**: It's ok if you break amp. Go ahead and accidentally remove
6
+ every file, commit, and then push it. We're not worried; we have immutable history
7
+ and multiple copies of the repo and advanced knowledge of `amp/hg revert`. You
8
+ can't hurt us.
9
+
10
+ == Specifics
11
+
12
+ = Amp config
13
+ Write now we save config information is ~/.hgrc. Somebody, please, either
14
+ drown me or make this go the fuck away. Config information could (should?)
15
+ be saved in the top section of the ampfile. It can be a YAML object serialized
16
+ with comments prefixing each line, with the entire section ending with a series
17
+ of #s.
18
+
19
+ = Remote Repositories
20
+ They. All. Look. The. Same. At least as far as amp is concerned, at them moment.
21
+ We need to fix this shiznizzle because this means you cannot use a foreign
22
+ repository for anything other than Mercurial, really (based on how the files
23
+ are loaded). Be creative. Be awesome. Be daring. Few in millions can speak like us.
24
+ Show the world why you are a programmer. SOLVE THIS PROBLEM!
25
+
26
+ == Maintenance
27
+
28
+ = Dependencies
29
+ We need these down to zero. Currently we DO need YARD, but flay and flog? We
30
+ haven't used these at all yet. Either remove these from the code (well, really
31
+ the Rakefiles) or add a way to fail gracefully. We also now need minitest, etc.
32
+ Development dependencies are ok, but dependencies for running? Kill them. Kill
33
+ them aaaaaaalllllllllllll.
34
+
35
+ = Multitude of Tests
36
+ Tests. We need them. Moar and moar of them. We want every command to be tested
37
+ (at least generally), although if every option were also tested that'd be
38
+ superb.
39
+
40
+ = Organization of Tests
41
+ We currently have a gigantic test_functional.rb file that has most of the good
42
+ tests. However, if there's a failure in the very beginning, the rest of the
43
+ tests won't be run. It's true – some of the tests are dependent on each other,
44
+ but perjaps there's a way to split them up into clusters that make sense and
45
+ can be run independently.
46
+
47
+ = Code Cleaning
48
+ We have ugly code. We try to mark it with comments, we try to eliminate it in
49
+ the first place, but seriously, when it comes to programming or doing some
50
+ World Religions homework, I'm going to get the homework done first. And then
51
+ some girl will have IMed me, and, well, you get the point. If you see ugly
52
+ code, kill it. Hopefully it won't require any major architectural changes.
53
+
54
+ = API Adherence
55
+ Make the commands in the workflows stick to the API. If something doesn't adhere,
56
+ change the API and change the command until it works. **NOTU BONE (Esperanto)**:
57
+ Write a plethora of tests before changing a command, lest you break some
58
+ little-known feature of the command and in its stead add a new "feature".
59
+
60
+ == Expansion
61
+
62
+ = Faster Bit Structs
63
+ We experimented with using bitstructs to represent objects in files. Although
64
+ this worked, it was MUCH slower than we could bare. We need a faster form of
65
+ a bitstruct. A bitstruct is a standard C struct. If has a format, it has fields
66
+ with names, and you can easily read and write them to and from files. Writing
67
+ this alone is a task big enough for a young adult. We need these tested and
68
+ benchmarked against not using bitstructs. Also, try to keep these pure ruby if
69
+ you can.
70
+
71
+ = Incorporating Bit Structs
72
+ Take the bitstructs of the previous paragraph and incorporate them into
73
+ everything. If you can, fix up the mercurial revlog API to make it suck a
74
+ little less.
75
+
76
+ = hg Extensions
77
+ Start porting over the Mercurial extensions. 'Nuff said.
78
+
79
+ = Expanding `amp serve`
80
+ We'd like it to be more like BitBucket and GitHub. Go crazy. One thing you
81
+ could do is implement other methods for storing users besides memory. There
82
+ are incomplete frameworks for Sequel and DataMapper storage that need TLC.
83
+
84
+ == Help
85
+
86
+ = Pages of info
87
+ We need to have specific pages explaining amp-specific features, and helping
88
+ users get started using amp. Anything put into lib/amp/help/entries will be
89
+ loaded with its filename as the help entry's name. So, if you create a file
90
+ called "ampfiles.md", then "amp help ampfiles" will present the file you created.
91
+
92
+ == Insects (low-low-low-priority bugs)
93
+
94
+ = Test Reloading
95
+ Files get double-loaded when we run tests. Fix this. Kill the fucking insect.
96
+
97
+ == Documentation
98
+
99
+ = User guide
100
+ We need a guide that will tell new users how to install and use amp. It should
101
+ explain what to do if you get a bug. Add this into the help system so it can be
102
+ CLI-accessible and browser-accessible. Add it to the man pages as well (see
103
+ tasks/man.rake).
104
+
105
+ = Inline documentation
106
+ Go through to big ugly methods (or any method, no matter how dumb) and add
107
+ inline comments explaining what the method does and HOW IT INTERACTS WITH
108
+ THE REST OF THE SYSTEM. Comments should be formatted according to YARD
109
+ documentation format (http://yardoc.org). Key questions to ask and answer:
110
+ Who (uses this), What (is passed in), Why (this exists), and How (this
111
+ interacts with the rest of the system).
112
+
113
+ = Wiki
114
+ We need to expand out BitBucket wiki so that it is more appeasing and useful.
115
+
116
+ == Optimization
117
+
118
+ = StagingArea#file_status
119
+ This is called like a million times and it's unnecessary. We can use memoization
120
+ alleviate any pains. But be apprised: we have yet to feel any pains from it.