amp-pure 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) hide show
  1. data/.gitignore +1 -0
  2. data/.hgignore +26 -0
  3. data/AUTHORS +2 -0
  4. data/History.txt +6 -0
  5. data/LICENSE +37 -0
  6. data/MANIFESTO +7 -0
  7. data/Manifest.txt +294 -0
  8. data/README.md +116 -0
  9. data/Rakefile +102 -0
  10. data/SCHEDULE.markdown +12 -0
  11. data/STYLE +27 -0
  12. data/TODO.markdown +149 -0
  13. data/ampfile.rb +47 -0
  14. data/bin/amp +30 -0
  15. data/bin/amp1.9 +30 -0
  16. data/ext/amp/bz2/README.txt +39 -0
  17. data/ext/amp/bz2/bz2.c +1582 -0
  18. data/ext/amp/bz2/extconf.rb +77 -0
  19. data/ext/amp/bz2/mkmf.log +29 -0
  20. data/ext/amp/mercurial_patch/extconf.rb +5 -0
  21. data/ext/amp/mercurial_patch/mpatch.c +405 -0
  22. data/ext/amp/priority_queue/extconf.rb +5 -0
  23. data/ext/amp/priority_queue/priority_queue.c +947 -0
  24. data/ext/amp/support/extconf.rb +5 -0
  25. data/ext/amp/support/support.c +250 -0
  26. data/lib/amp.rb +200 -0
  27. data/lib/amp/commands/command.rb +507 -0
  28. data/lib/amp/commands/command_support.rb +137 -0
  29. data/lib/amp/commands/commands/config.rb +143 -0
  30. data/lib/amp/commands/commands/help.rb +29 -0
  31. data/lib/amp/commands/commands/init.rb +10 -0
  32. data/lib/amp/commands/commands/templates.rb +137 -0
  33. data/lib/amp/commands/commands/version.rb +7 -0
  34. data/lib/amp/commands/commands/workflow.rb +28 -0
  35. data/lib/amp/commands/commands/workflows/git/add.rb +65 -0
  36. data/lib/amp/commands/commands/workflows/git/copy.rb +27 -0
  37. data/lib/amp/commands/commands/workflows/git/mv.rb +23 -0
  38. data/lib/amp/commands/commands/workflows/git/rm.rb +60 -0
  39. data/lib/amp/commands/commands/workflows/hg/add.rb +53 -0
  40. data/lib/amp/commands/commands/workflows/hg/addremove.rb +86 -0
  41. data/lib/amp/commands/commands/workflows/hg/annotate.rb +46 -0
  42. data/lib/amp/commands/commands/workflows/hg/archive.rb +126 -0
  43. data/lib/amp/commands/commands/workflows/hg/branch.rb +28 -0
  44. data/lib/amp/commands/commands/workflows/hg/branches.rb +30 -0
  45. data/lib/amp/commands/commands/workflows/hg/bundle.rb +115 -0
  46. data/lib/amp/commands/commands/workflows/hg/clone.rb +95 -0
  47. data/lib/amp/commands/commands/workflows/hg/commit.rb +42 -0
  48. data/lib/amp/commands/commands/workflows/hg/copy.rb +31 -0
  49. data/lib/amp/commands/commands/workflows/hg/debug/dirstate.rb +32 -0
  50. data/lib/amp/commands/commands/workflows/hg/debug/index.rb +36 -0
  51. data/lib/amp/commands/commands/workflows/hg/default.rb +9 -0
  52. data/lib/amp/commands/commands/workflows/hg/diff.rb +30 -0
  53. data/lib/amp/commands/commands/workflows/hg/forget.rb +11 -0
  54. data/lib/amp/commands/commands/workflows/hg/heads.rb +25 -0
  55. data/lib/amp/commands/commands/workflows/hg/identify.rb +23 -0
  56. data/lib/amp/commands/commands/workflows/hg/import.rb +135 -0
  57. data/lib/amp/commands/commands/workflows/hg/incoming.rb +85 -0
  58. data/lib/amp/commands/commands/workflows/hg/info.rb +18 -0
  59. data/lib/amp/commands/commands/workflows/hg/log.rb +21 -0
  60. data/lib/amp/commands/commands/workflows/hg/manifest.rb +13 -0
  61. data/lib/amp/commands/commands/workflows/hg/merge.rb +53 -0
  62. data/lib/amp/commands/commands/workflows/hg/move.rb +28 -0
  63. data/lib/amp/commands/commands/workflows/hg/outgoing.rb +61 -0
  64. data/lib/amp/commands/commands/workflows/hg/pull.rb +74 -0
  65. data/lib/amp/commands/commands/workflows/hg/push.rb +20 -0
  66. data/lib/amp/commands/commands/workflows/hg/remove.rb +45 -0
  67. data/lib/amp/commands/commands/workflows/hg/resolve.rb +83 -0
  68. data/lib/amp/commands/commands/workflows/hg/revert.rb +53 -0
  69. data/lib/amp/commands/commands/workflows/hg/root.rb +13 -0
  70. data/lib/amp/commands/commands/workflows/hg/serve.rb +38 -0
  71. data/lib/amp/commands/commands/workflows/hg/status.rb +116 -0
  72. data/lib/amp/commands/commands/workflows/hg/tag.rb +69 -0
  73. data/lib/amp/commands/commands/workflows/hg/tags.rb +27 -0
  74. data/lib/amp/commands/commands/workflows/hg/tip.rb +13 -0
  75. data/lib/amp/commands/commands/workflows/hg/update.rb +27 -0
  76. data/lib/amp/commands/commands/workflows/hg/verify.rb +9 -0
  77. data/lib/amp/commands/commands/workflows/hg/view.rb +36 -0
  78. data/lib/amp/commands/dispatch.rb +181 -0
  79. data/lib/amp/commands/hooks.rb +81 -0
  80. data/lib/amp/dependencies/amp_support.rb +1 -0
  81. data/lib/amp/dependencies/amp_support/ruby_amp_support.rb +103 -0
  82. data/lib/amp/dependencies/minitar.rb +979 -0
  83. data/lib/amp/dependencies/priority_queue.rb +18 -0
  84. data/lib/amp/dependencies/priority_queue/c_priority_queue.rb +1 -0
  85. data/lib/amp/dependencies/priority_queue/poor_priority_queue.rb +46 -0
  86. data/lib/amp/dependencies/priority_queue/ruby_priority_queue.rb +525 -0
  87. data/lib/amp/dependencies/python_config.rb +211 -0
  88. data/lib/amp/dependencies/trollop.rb +713 -0
  89. data/lib/amp/dependencies/zip/ioextras.rb +155 -0
  90. data/lib/amp/dependencies/zip/stdrubyext.rb +111 -0
  91. data/lib/amp/dependencies/zip/tempfile_bugfixed.rb +186 -0
  92. data/lib/amp/dependencies/zip/zip.rb +1850 -0
  93. data/lib/amp/dependencies/zip/zipfilesystem.rb +609 -0
  94. data/lib/amp/dependencies/zip/ziprequire.rb +90 -0
  95. data/lib/amp/encoding/base85.rb +97 -0
  96. data/lib/amp/encoding/binary_diff.rb +82 -0
  97. data/lib/amp/encoding/difflib.rb +166 -0
  98. data/lib/amp/encoding/mercurial_diff.rb +378 -0
  99. data/lib/amp/encoding/mercurial_patch.rb +1 -0
  100. data/lib/amp/encoding/patch.rb +292 -0
  101. data/lib/amp/encoding/pure_ruby/ruby_mercurial_patch.rb +123 -0
  102. data/lib/amp/extensions/ditz.rb +41 -0
  103. data/lib/amp/extensions/lighthouse.rb +167 -0
  104. data/lib/amp/graphs/ancestor.rb +147 -0
  105. data/lib/amp/graphs/copies.rb +261 -0
  106. data/lib/amp/merges/merge_state.rb +164 -0
  107. data/lib/amp/merges/merge_ui.rb +322 -0
  108. data/lib/amp/merges/simple_merge.rb +450 -0
  109. data/lib/amp/profiling_hacks.rb +36 -0
  110. data/lib/amp/repository/branch_manager.rb +234 -0
  111. data/lib/amp/repository/dir_state.rb +950 -0
  112. data/lib/amp/repository/journal.rb +203 -0
  113. data/lib/amp/repository/lock.rb +207 -0
  114. data/lib/amp/repository/repositories/bundle_repository.rb +214 -0
  115. data/lib/amp/repository/repositories/http_repository.rb +377 -0
  116. data/lib/amp/repository/repositories/local_repository.rb +2661 -0
  117. data/lib/amp/repository/repository.rb +94 -0
  118. data/lib/amp/repository/store.rb +485 -0
  119. data/lib/amp/repository/tag_manager.rb +319 -0
  120. data/lib/amp/repository/updatable.rb +532 -0
  121. data/lib/amp/repository/verification.rb +431 -0
  122. data/lib/amp/repository/versioned_file.rb +475 -0
  123. data/lib/amp/revlogs/bundle_revlogs.rb +246 -0
  124. data/lib/amp/revlogs/changegroup.rb +217 -0
  125. data/lib/amp/revlogs/changelog.rb +338 -0
  126. data/lib/amp/revlogs/changeset.rb +521 -0
  127. data/lib/amp/revlogs/file_log.rb +165 -0
  128. data/lib/amp/revlogs/index.rb +493 -0
  129. data/lib/amp/revlogs/manifest.rb +195 -0
  130. data/lib/amp/revlogs/node.rb +18 -0
  131. data/lib/amp/revlogs/revlog.rb +1032 -0
  132. data/lib/amp/revlogs/revlog_support.rb +126 -0
  133. data/lib/amp/server/amp_user.rb +44 -0
  134. data/lib/amp/server/extension/amp_extension.rb +396 -0
  135. data/lib/amp/server/extension/authorization.rb +201 -0
  136. data/lib/amp/server/fancy_http_server.rb +252 -0
  137. data/lib/amp/server/fancy_views/_browser.haml +28 -0
  138. data/lib/amp/server/fancy_views/_diff_file.haml +13 -0
  139. data/lib/amp/server/fancy_views/_navbar.haml +17 -0
  140. data/lib/amp/server/fancy_views/changeset.haml +31 -0
  141. data/lib/amp/server/fancy_views/commits.haml +32 -0
  142. data/lib/amp/server/fancy_views/file.haml +35 -0
  143. data/lib/amp/server/fancy_views/file_diff.haml +23 -0
  144. data/lib/amp/server/fancy_views/harshcss/all_hallows_eve.css +72 -0
  145. data/lib/amp/server/fancy_views/harshcss/amy.css +147 -0
  146. data/lib/amp/server/fancy_views/harshcss/twilight.css +138 -0
  147. data/lib/amp/server/fancy_views/stylesheet.sass +175 -0
  148. data/lib/amp/server/http_server.rb +140 -0
  149. data/lib/amp/server/repo_user_management.rb +287 -0
  150. data/lib/amp/support/amp_config.rb +164 -0
  151. data/lib/amp/support/amp_ui.rb +287 -0
  152. data/lib/amp/support/docs.rb +54 -0
  153. data/lib/amp/support/generator.rb +78 -0
  154. data/lib/amp/support/ignore.rb +144 -0
  155. data/lib/amp/support/loaders.rb +93 -0
  156. data/lib/amp/support/logger.rb +103 -0
  157. data/lib/amp/support/match.rb +151 -0
  158. data/lib/amp/support/multi_io.rb +87 -0
  159. data/lib/amp/support/openers.rb +121 -0
  160. data/lib/amp/support/ruby_19_compatibility.rb +66 -0
  161. data/lib/amp/support/support.rb +1095 -0
  162. data/lib/amp/templates/blank.commit.erb +23 -0
  163. data/lib/amp/templates/blank.log.erb +18 -0
  164. data/lib/amp/templates/default.commit.erb +23 -0
  165. data/lib/amp/templates/default.log.erb +26 -0
  166. data/lib/amp/templates/template.rb +165 -0
  167. data/site/Rakefile +24 -0
  168. data/site/src/about/ampfile.haml +57 -0
  169. data/site/src/about/commands.haml +106 -0
  170. data/site/src/about/index.haml +33 -0
  171. data/site/src/about/performance.haml +31 -0
  172. data/site/src/about/workflows.haml +34 -0
  173. data/site/src/contribute/index.haml +65 -0
  174. data/site/src/contribute/style.haml +297 -0
  175. data/site/src/css/active4d.css +114 -0
  176. data/site/src/css/all_hallows_eve.css +72 -0
  177. data/site/src/css/all_themes.css +3299 -0
  178. data/site/src/css/amp.css +260 -0
  179. data/site/src/css/amy.css +147 -0
  180. data/site/src/css/blackboard.css +88 -0
  181. data/site/src/css/brilliance_black.css +605 -0
  182. data/site/src/css/brilliance_dull.css +599 -0
  183. data/site/src/css/cobalt.css +149 -0
  184. data/site/src/css/cur_amp.css +185 -0
  185. data/site/src/css/dawn.css +121 -0
  186. data/site/src/css/eiffel.css +121 -0
  187. data/site/src/css/espresso_libre.css +109 -0
  188. data/site/src/css/idle.css +62 -0
  189. data/site/src/css/iplastic.css +80 -0
  190. data/site/src/css/lazy.css +73 -0
  191. data/site/src/css/mac_classic.css +123 -0
  192. data/site/src/css/magicwb_amiga.css +104 -0
  193. data/site/src/css/pastels_on_dark.css +188 -0
  194. data/site/src/css/reset.css +55 -0
  195. data/site/src/css/slush_poppies.css +85 -0
  196. data/site/src/css/spacecadet.css +51 -0
  197. data/site/src/css/sunburst.css +180 -0
  198. data/site/src/css/twilight.css +137 -0
  199. data/site/src/css/zenburnesque.css +91 -0
  200. data/site/src/get/index.haml +32 -0
  201. data/site/src/helpers.rb +121 -0
  202. data/site/src/images/amp_logo.png +0 -0
  203. data/site/src/images/carbonica.png +0 -0
  204. data/site/src/images/revolution.png +0 -0
  205. data/site/src/images/tab-bg.png +0 -0
  206. data/site/src/images/tab-sliding-left.png +0 -0
  207. data/site/src/images/tab-sliding-right.png +0 -0
  208. data/site/src/include/_footer.haml +22 -0
  209. data/site/src/include/_header.haml +17 -0
  210. data/site/src/index.haml +104 -0
  211. data/site/src/learn/index.haml +46 -0
  212. data/site/src/scripts/jquery-1.3.2.min.js +19 -0
  213. data/site/src/scripts/jquery.cookie.js +96 -0
  214. data/tasks/stats.rake +155 -0
  215. data/tasks/yard.rake +171 -0
  216. data/test/dirstate_tests/dirstate +0 -0
  217. data/test/dirstate_tests/hgrc +5 -0
  218. data/test/dirstate_tests/test_dir_state.rb +192 -0
  219. data/test/functional_tests/resources/.hgignore +2 -0
  220. data/test/functional_tests/resources/STYLE.txt +25 -0
  221. data/test/functional_tests/resources/command.rb +372 -0
  222. data/test/functional_tests/resources/commands/annotate.rb +57 -0
  223. data/test/functional_tests/resources/commands/experimental/lolcats.rb +17 -0
  224. data/test/functional_tests/resources/commands/heads.rb +22 -0
  225. data/test/functional_tests/resources/commands/manifest.rb +12 -0
  226. data/test/functional_tests/resources/commands/status.rb +90 -0
  227. data/test/functional_tests/resources/version2/.hgignore +5 -0
  228. data/test/functional_tests/resources/version2/STYLE.txt +25 -0
  229. data/test/functional_tests/resources/version2/command.rb +372 -0
  230. data/test/functional_tests/resources/version2/commands/annotate.rb +45 -0
  231. data/test/functional_tests/resources/version2/commands/experimental/lolcats.rb +17 -0
  232. data/test/functional_tests/resources/version2/commands/heads.rb +22 -0
  233. data/test/functional_tests/resources/version2/commands/manifest.rb +12 -0
  234. data/test/functional_tests/resources/version2/commands/status.rb +90 -0
  235. data/test/functional_tests/resources/version3/.hgignore +5 -0
  236. data/test/functional_tests/resources/version3/STYLE.txt +31 -0
  237. data/test/functional_tests/resources/version3/command.rb +376 -0
  238. data/test/functional_tests/resources/version3/commands/annotate.rb +45 -0
  239. data/test/functional_tests/resources/version3/commands/experimental/lolcats.rb +17 -0
  240. data/test/functional_tests/resources/version3/commands/heads.rb +22 -0
  241. data/test/functional_tests/resources/version3/commands/manifest.rb +12 -0
  242. data/test/functional_tests/resources/version3/commands/status.rb +90 -0
  243. data/test/functional_tests/resources/version4/.hgignore +5 -0
  244. data/test/functional_tests/resources/version4/STYLE.txt +31 -0
  245. data/test/functional_tests/resources/version4/command.rb +376 -0
  246. data/test/functional_tests/resources/version4/commands/experimental/lolcats.rb +17 -0
  247. data/test/functional_tests/resources/version4/commands/heads.rb +22 -0
  248. data/test/functional_tests/resources/version4/commands/manifest.rb +12 -0
  249. data/test/functional_tests/resources/version4/commands/stats.rb +25 -0
  250. data/test/functional_tests/resources/version4/commands/status.rb +90 -0
  251. data/test/functional_tests/resources/version5_1/.hgignore +5 -0
  252. data/test/functional_tests/resources/version5_1/STYLE.txt +2 -0
  253. data/test/functional_tests/resources/version5_1/command.rb +374 -0
  254. data/test/functional_tests/resources/version5_1/commands/experimental/lolcats.rb +17 -0
  255. data/test/functional_tests/resources/version5_1/commands/heads.rb +22 -0
  256. data/test/functional_tests/resources/version5_1/commands/manifest.rb +12 -0
  257. data/test/functional_tests/resources/version5_1/commands/stats.rb +25 -0
  258. data/test/functional_tests/resources/version5_1/commands/status.rb +90 -0
  259. data/test/functional_tests/resources/version5_2/.hgignore +5 -0
  260. data/test/functional_tests/resources/version5_2/STYLE.txt +14 -0
  261. data/test/functional_tests/resources/version5_2/command.rb +376 -0
  262. data/test/functional_tests/resources/version5_2/commands/experimental/lolcats.rb +17 -0
  263. data/test/functional_tests/resources/version5_2/commands/manifest.rb +12 -0
  264. data/test/functional_tests/resources/version5_2/commands/newz.rb +12 -0
  265. data/test/functional_tests/resources/version5_2/commands/stats.rb +25 -0
  266. data/test/functional_tests/resources/version5_2/commands/status.rb +90 -0
  267. data/test/functional_tests/test_functional.rb +604 -0
  268. data/test/localrepo_tests/test_local_repo.rb +121 -0
  269. data/test/localrepo_tests/testrepo.tar.gz +0 -0
  270. data/test/manifest_tests/00manifest.i +0 -0
  271. data/test/manifest_tests/test_manifest.rb +72 -0
  272. data/test/merge_tests/base.txt +10 -0
  273. data/test/merge_tests/expected.local.txt +16 -0
  274. data/test/merge_tests/local.txt +11 -0
  275. data/test/merge_tests/remote.txt +11 -0
  276. data/test/merge_tests/test_merge.rb +26 -0
  277. data/test/revlog_tests/00changelog.i +0 -0
  278. data/test/revlog_tests/revision_added_changelog.i +0 -0
  279. data/test/revlog_tests/test_adding_index.i +0 -0
  280. data/test/revlog_tests/test_revlog.rb +333 -0
  281. data/test/revlog_tests/testindex.i +0 -0
  282. data/test/store_tests/store.tar.gz +0 -0
  283. data/test/store_tests/test_fncache_store.rb +122 -0
  284. data/test/test_amp.rb +9 -0
  285. data/test/test_base85.rb +14 -0
  286. data/test/test_bdiff.rb +42 -0
  287. data/test/test_commands.rb +122 -0
  288. data/test/test_difflib.rb +50 -0
  289. data/test/test_helper.rb +15 -0
  290. data/test/test_journal.rb +29 -0
  291. data/test/test_match.rb +134 -0
  292. data/test/test_mdiff.rb +74 -0
  293. data/test/test_mpatch.rb +14 -0
  294. data/test/test_support.rb +24 -0
  295. metadata +382 -0
@@ -0,0 +1 @@
1
+ .hg/*
@@ -0,0 +1,26 @@
1
+ syntax: glob
2
+ .git/*
3
+ doc/*
4
+ .idea/*
5
+ .yardoc
6
+ test/store_tests/store/*
7
+ test/localrepo_tests/testrepo/*
8
+ test/localrepo_tests/.hg/*
9
+ test/functional_tests/testrepo/*
10
+ test/functional_tests/conflictrepo/*
11
+ test/functional_tests/newrepo/*
12
+ test/merge_tests/local.txt.out
13
+ test/functional_tests/commit.log
14
+ test/functional_tests/dirstate
15
+ ext/*/*/*.o
16
+ ext/*/*/*.bundle
17
+ ext/*/*/Makefile
18
+ ext/*/*.o
19
+ ext/*/*.bundle
20
+ ext/*/Makefile
21
+ amp_serve_users.db
22
+ pkg/*
23
+ site/build/*
24
+ site/src/doc*
25
+ syntax: regexp
26
+ \.DS_Store
data/AUTHORS ADDED
@@ -0,0 +1,2 @@
1
+ Ari Brown
2
+ Michael Edgar
@@ -0,0 +1,6 @@
1
+ === 0.1.1 / 2009-07-24
2
+
3
+ * First public release
4
+
5
+ * Full implementation of Mercurial in Ruby.
6
+ * Spiffy command system.
data/LICENSE ADDED
@@ -0,0 +1,37 @@
1
+ This project includes a large amount of source code from a number of different resources.
2
+ They are listed, in no particular order, along with the license ascribed to the code
3
+ associated with it.
4
+
5
+ 1. Mercurial (GPLv2)
6
+ A large number of algorithms in Amp are inspired by, or in some cases, direct translations,
7
+ of code in the Mercurial source. This makes this our code a derivative work, and thus GPLv2.
8
+ 2. BZ2 (Ruby License) - Guy Decoux
9
+ This code has been copied verbatim into our repository.
10
+
11
+ "This extension module is copyrighted free software by Guy Decoux
12
+
13
+ You can redistribute it and/or modify it under the same term as
14
+ Ruby." -- README.rdoc of BZ2 gem
15
+
16
+ 3. Priority Queue - 2005 Brian Schroder
17
+ This code has been copied verbatim into our repository.
18
+
19
+ "* (c) 2005 Brian Schroder
20
+ *
21
+ * Please submit bugreports to priority_queue@brian-schroeder.de
22
+ *
23
+ * This extension is under the same license as ruby."
24
+ -- priority_queue.c, lines 5-10
25
+
26
+ 4. Rubyzip - Thomas Sondergaard
27
+ This code has been copied verbatim into our repository.
28
+
29
+ "License
30
+
31
+ rubyzip is distributed under the same license as ruby. See www.ruby-lang.org/en/LICENSE.txt"
32
+ http://rubyzip.sourceforge.net/
33
+
34
+ 5. Minitar - Copyright 2004 Mauricio Julio Fernández Pradier and Austin Ziegler
35
+ This code has been copied verbatim into our repository.
36
+
37
+ "This program is free software. It may be redistributed and/or modified under the terms of the GPL version 2 (or later) or Ruby’s licence. " -- http://raa.ruby-lang.org/project/minitar/
@@ -0,0 +1,7 @@
1
+ We want a piece of software that's:
2
+ 1) Free of religious devotion to one VCS
3
+ 2) Let's us customize how we interact with it. If we want git's commands because i used it the longest, let us use them with a fucking mercurial repo.
4
+ 3) We want the extension we wrote for the dartmouth review repo, which is HG, to work on my github project too. because they're both DVCS, damnit.
5
+ 4) We want to be able to directly modify the commands they give us. git's remove command is `git rm`. it should be dead simple to make `git remove` map directly to that, and we mean less than 1 minute of thought/work.
6
+ 5) We want to prove ruby is viable for large-scale applications, not just web frameworks. can you think of any non-trivial actual applications written in ruby?
7
+ 6) We want to discover where the limits are on Ruby for use in large applications. Where is the language slow? Where is it fast? What techniques are effective? Too many people opine about proper Ruby code, then provide 10 lines of code to illustrate their point. We wrote 15,000 and hope to write many more: what can we learn from that?
@@ -0,0 +1,294 @@
1
+ .gitignore
2
+ .hgignore
3
+ AUTHORS
4
+ History.txt
5
+ LICENSE
6
+ MANIFESTO
7
+ Manifest.txt
8
+ README.md
9
+ Rakefile
10
+ SCHEDULE.markdown
11
+ STYLE
12
+ TODO.markdown
13
+ ampfile.rb
14
+ bin/amp
15
+ bin/amp1.9
16
+ ext/amp/bz2/README.txt
17
+ ext/amp/bz2/bz2.c
18
+ ext/amp/bz2/extconf.rb
19
+ ext/amp/bz2/mkmf.log
20
+ ext/amp/mercurial_patch/extconf.rb
21
+ ext/amp/mercurial_patch/mpatch.c
22
+ ext/amp/priority_queue/extconf.rb
23
+ ext/amp/priority_queue/priority_queue.c
24
+ ext/amp/support/extconf.rb
25
+ ext/amp/support/support.c
26
+ lib/amp.rb
27
+ lib/amp/commands/command.rb
28
+ lib/amp/commands/command_support.rb
29
+ lib/amp/commands/commands/config.rb
30
+ lib/amp/commands/commands/help.rb
31
+ lib/amp/commands/commands/init.rb
32
+ lib/amp/commands/commands/templates.rb
33
+ lib/amp/commands/commands/version.rb
34
+ lib/amp/commands/commands/workflow.rb
35
+ lib/amp/commands/commands/workflows/git/add.rb
36
+ lib/amp/commands/commands/workflows/git/copy.rb
37
+ lib/amp/commands/commands/workflows/git/mv.rb
38
+ lib/amp/commands/commands/workflows/git/rm.rb
39
+ lib/amp/commands/commands/workflows/hg/add.rb
40
+ lib/amp/commands/commands/workflows/hg/addremove.rb
41
+ lib/amp/commands/commands/workflows/hg/annotate.rb
42
+ lib/amp/commands/commands/workflows/hg/archive.rb
43
+ lib/amp/commands/commands/workflows/hg/branch.rb
44
+ lib/amp/commands/commands/workflows/hg/branches.rb
45
+ lib/amp/commands/commands/workflows/hg/bundle.rb
46
+ lib/amp/commands/commands/workflows/hg/clone.rb
47
+ lib/amp/commands/commands/workflows/hg/commit.rb
48
+ lib/amp/commands/commands/workflows/hg/copy.rb
49
+ lib/amp/commands/commands/workflows/hg/debug/dirstate.rb
50
+ lib/amp/commands/commands/workflows/hg/debug/index.rb
51
+ lib/amp/commands/commands/workflows/hg/default.rb
52
+ lib/amp/commands/commands/workflows/hg/diff.rb
53
+ lib/amp/commands/commands/workflows/hg/forget.rb
54
+ lib/amp/commands/commands/workflows/hg/heads.rb
55
+ lib/amp/commands/commands/workflows/hg/identify.rb
56
+ lib/amp/commands/commands/workflows/hg/import.rb
57
+ lib/amp/commands/commands/workflows/hg/incoming.rb
58
+ lib/amp/commands/commands/workflows/hg/info.rb
59
+ lib/amp/commands/commands/workflows/hg/log.rb
60
+ lib/amp/commands/commands/workflows/hg/manifest.rb
61
+ lib/amp/commands/commands/workflows/hg/merge.rb
62
+ lib/amp/commands/commands/workflows/hg/move.rb
63
+ lib/amp/commands/commands/workflows/hg/outgoing.rb
64
+ lib/amp/commands/commands/workflows/hg/pull.rb
65
+ lib/amp/commands/commands/workflows/hg/push.rb
66
+ lib/amp/commands/commands/workflows/hg/remove.rb
67
+ lib/amp/commands/commands/workflows/hg/resolve.rb
68
+ lib/amp/commands/commands/workflows/hg/revert.rb
69
+ lib/amp/commands/commands/workflows/hg/root.rb
70
+ lib/amp/commands/commands/workflows/hg/serve.rb
71
+ lib/amp/commands/commands/workflows/hg/status.rb
72
+ lib/amp/commands/commands/workflows/hg/tag.rb
73
+ lib/amp/commands/commands/workflows/hg/tags.rb
74
+ lib/amp/commands/commands/workflows/hg/tip.rb
75
+ lib/amp/commands/commands/workflows/hg/update.rb
76
+ lib/amp/commands/commands/workflows/hg/verify.rb
77
+ lib/amp/commands/commands/workflows/hg/view.rb
78
+ lib/amp/commands/dispatch.rb
79
+ lib/amp/commands/hooks.rb
80
+ lib/amp/dependencies/amp_support.rb
81
+ lib/amp/dependencies/amp_support/ruby_amp_support.rb
82
+ lib/amp/dependencies/minitar.rb
83
+ lib/amp/dependencies/priority_queue.rb
84
+ lib/amp/dependencies/priority_queue/c_priority_queue.rb
85
+ lib/amp/dependencies/priority_queue/poor_priority_queue.rb
86
+ lib/amp/dependencies/priority_queue/ruby_priority_queue.rb
87
+ lib/amp/dependencies/python_config.rb
88
+ lib/amp/dependencies/trollop.rb
89
+ lib/amp/dependencies/zip/ioextras.rb
90
+ lib/amp/dependencies/zip/stdrubyext.rb
91
+ lib/amp/dependencies/zip/tempfile_bugfixed.rb
92
+ lib/amp/dependencies/zip/zip.rb
93
+ lib/amp/dependencies/zip/zipfilesystem.rb
94
+ lib/amp/dependencies/zip/ziprequire.rb
95
+ lib/amp/encoding/base85.rb
96
+ lib/amp/encoding/binary_diff.rb
97
+ 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
+ lib/amp/extensions/ditz.rb
103
+ lib/amp/extensions/lighthouse.rb
104
+ lib/amp/graphs/ancestor.rb
105
+ 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
109
+ 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
117
+ 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
+ lib/amp/server/amp_user.rb
134
+ lib/amp/server/extension/amp_extension.rb
135
+ lib/amp/server/extension/authorization.rb
136
+ lib/amp/server/fancy_http_server.rb
137
+ lib/amp/server/fancy_views/_browser.haml
138
+ lib/amp/server/fancy_views/_diff_file.haml
139
+ lib/amp/server/fancy_views/_navbar.haml
140
+ lib/amp/server/fancy_views/changeset.haml
141
+ lib/amp/server/fancy_views/commits.haml
142
+ lib/amp/server/fancy_views/file.haml
143
+ lib/amp/server/fancy_views/file_diff.haml
144
+ lib/amp/server/fancy_views/harshcss/all_hallows_eve.css
145
+ lib/amp/server/fancy_views/harshcss/amy.css
146
+ lib/amp/server/fancy_views/harshcss/twilight.css
147
+ lib/amp/server/fancy_views/stylesheet.sass
148
+ lib/amp/server/http_server.rb
149
+ lib/amp/server/repo_user_management.rb
150
+ lib/amp/support/amp_config.rb
151
+ lib/amp/support/amp_ui.rb
152
+ lib/amp/support/docs.rb
153
+ lib/amp/support/generator.rb
154
+ lib/amp/support/ignore.rb
155
+ lib/amp/support/loaders.rb
156
+ lib/amp/support/logger.rb
157
+ lib/amp/support/match.rb
158
+ lib/amp/support/multi_io.rb
159
+ lib/amp/support/openers.rb
160
+ lib/amp/support/ruby_19_compatibility.rb
161
+ 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
166
+ lib/amp/templates/template.rb
167
+ site/Rakefile
168
+ site/src/about/ampfile.haml
169
+ site/src/about/commands.haml
170
+ site/src/about/index.haml
171
+ site/src/about/performance.haml
172
+ site/src/about/workflows.haml
173
+ site/src/contribute/index.haml
174
+ site/src/contribute/style.haml
175
+ site/src/css/active4d.css
176
+ site/src/css/all_hallows_eve.css
177
+ site/src/css/all_themes.css
178
+ site/src/css/amp.css
179
+ site/src/css/amy.css
180
+ site/src/css/blackboard.css
181
+ site/src/css/brilliance_black.css
182
+ site/src/css/brilliance_dull.css
183
+ site/src/css/cobalt.css
184
+ site/src/css/cur_amp.css
185
+ site/src/css/dawn.css
186
+ site/src/css/eiffel.css
187
+ site/src/css/espresso_libre.css
188
+ site/src/css/idle.css
189
+ site/src/css/iplastic.css
190
+ site/src/css/lazy.css
191
+ site/src/css/mac_classic.css
192
+ site/src/css/magicwb_amiga.css
193
+ site/src/css/pastels_on_dark.css
194
+ site/src/css/reset.css
195
+ site/src/css/slush_poppies.css
196
+ site/src/css/spacecadet.css
197
+ site/src/css/sunburst.css
198
+ site/src/css/twilight.css
199
+ site/src/css/zenburnesque.css
200
+ site/src/get/index.haml
201
+ site/src/helpers.rb
202
+ site/src/images/amp_logo.png
203
+ site/src/images/carbonica.png
204
+ site/src/images/revolution.png
205
+ site/src/images/tab-bg.png
206
+ site/src/images/tab-sliding-left.png
207
+ site/src/images/tab-sliding-right.png
208
+ site/src/include/_footer.haml
209
+ site/src/include/_header.haml
210
+ site/src/index.haml
211
+ site/src/learn/index.haml
212
+ site/src/scripts/jquery-1.3.2.min.js
213
+ site/src/scripts/jquery.cookie.js
214
+ tasks/stats.rake
215
+ tasks/yard.rake
216
+ test/dirstate_tests/dirstate
217
+ test/dirstate_tests/hgrc
218
+ test/dirstate_tests/test_dir_state.rb
219
+ test/functional_tests/resources/.hgignore
220
+ test/functional_tests/resources/STYLE.txt
221
+ test/functional_tests/resources/command.rb
222
+ test/functional_tests/resources/commands/annotate.rb
223
+ test/functional_tests/resources/commands/experimental/lolcats.rb
224
+ test/functional_tests/resources/commands/heads.rb
225
+ test/functional_tests/resources/commands/manifest.rb
226
+ test/functional_tests/resources/commands/status.rb
227
+ test/functional_tests/resources/version2/.hgignore
228
+ test/functional_tests/resources/version2/STYLE.txt
229
+ test/functional_tests/resources/version2/command.rb
230
+ test/functional_tests/resources/version2/commands/annotate.rb
231
+ test/functional_tests/resources/version2/commands/experimental/lolcats.rb
232
+ test/functional_tests/resources/version2/commands/heads.rb
233
+ test/functional_tests/resources/version2/commands/manifest.rb
234
+ test/functional_tests/resources/version2/commands/status.rb
235
+ test/functional_tests/resources/version3/.hgignore
236
+ test/functional_tests/resources/version3/STYLE.txt
237
+ test/functional_tests/resources/version3/command.rb
238
+ test/functional_tests/resources/version3/commands/annotate.rb
239
+ test/functional_tests/resources/version3/commands/experimental/lolcats.rb
240
+ test/functional_tests/resources/version3/commands/heads.rb
241
+ test/functional_tests/resources/version3/commands/manifest.rb
242
+ test/functional_tests/resources/version3/commands/status.rb
243
+ test/functional_tests/resources/version4/.hgignore
244
+ test/functional_tests/resources/version4/STYLE.txt
245
+ test/functional_tests/resources/version4/command.rb
246
+ test/functional_tests/resources/version4/commands/experimental/lolcats.rb
247
+ test/functional_tests/resources/version4/commands/heads.rb
248
+ test/functional_tests/resources/version4/commands/manifest.rb
249
+ test/functional_tests/resources/version4/commands/stats.rb
250
+ test/functional_tests/resources/version4/commands/status.rb
251
+ test/functional_tests/resources/version5_1/.hgignore
252
+ test/functional_tests/resources/version5_1/STYLE.txt
253
+ test/functional_tests/resources/version5_1/command.rb
254
+ test/functional_tests/resources/version5_1/commands/experimental/lolcats.rb
255
+ test/functional_tests/resources/version5_1/commands/heads.rb
256
+ test/functional_tests/resources/version5_1/commands/manifest.rb
257
+ test/functional_tests/resources/version5_1/commands/stats.rb
258
+ test/functional_tests/resources/version5_1/commands/status.rb
259
+ test/functional_tests/resources/version5_2/.hgignore
260
+ test/functional_tests/resources/version5_2/STYLE.txt
261
+ test/functional_tests/resources/version5_2/command.rb
262
+ test/functional_tests/resources/version5_2/commands/experimental/lolcats.rb
263
+ test/functional_tests/resources/version5_2/commands/manifest.rb
264
+ test/functional_tests/resources/version5_2/commands/newz.rb
265
+ test/functional_tests/resources/version5_2/commands/stats.rb
266
+ test/functional_tests/resources/version5_2/commands/status.rb
267
+ test/functional_tests/test_functional.rb
268
+ test/localrepo_tests/test_local_repo.rb
269
+ test/localrepo_tests/testrepo.tar.gz
270
+ test/manifest_tests/00manifest.i
271
+ test/manifest_tests/test_manifest.rb
272
+ test/merge_tests/base.txt
273
+ test/merge_tests/expected.local.txt
274
+ test/merge_tests/local.txt
275
+ test/merge_tests/remote.txt
276
+ test/merge_tests/test_merge.rb
277
+ test/revlog_tests/00changelog.i
278
+ test/revlog_tests/revision_added_changelog.i
279
+ test/revlog_tests/test_adding_index.i
280
+ test/revlog_tests/test_revlog.rb
281
+ test/revlog_tests/testindex.i
282
+ test/store_tests/store.tar.gz
283
+ test/store_tests/test_fncache_store.rb
284
+ test/test_amp.rb
285
+ test/test_base85.rb
286
+ test/test_bdiff.rb
287
+ test/test_commands.rb
288
+ test/test_difflib.rb
289
+ test/test_helper.rb
290
+ test/test_journal.rb
291
+ test/test_match.rb
292
+ test/test_mdiff.rb
293
+ test/test_mpatch.rb
294
+ test/test_support.rb
@@ -0,0 +1,116 @@
1
+ Amp Release v0.5.0 (John Locke)
2
+ ==============================
3
+
4
+ **Homepage**: [http://amp.carboni.ca](http://amp.carboni.ca)
5
+ **IRC**: **#amp-vcs on irc.freenode.net**
6
+ **Git**: [http://github.com/michaeledgar/amp](http://github.com/michaeledgar/amp)
7
+ **Mercurial**: [http://bitbucket.org/carbonica/amp](http://bitbucket.org/carbonica/amp)
8
+ **Author**: Michael Edgar & Ari Brown
9
+ **Copyright**: 2009
10
+ **License**: GPLv2 (inherited from Mercurial)
11
+
12
+
13
+ Description:
14
+ ------------
15
+
16
+ A ruby interface to Mercurial repositories, from the command line or a program.
17
+
18
+ Features/Problems:
19
+ ------------------
20
+
21
+ * Supports Mercurial repositories completely!
22
+
23
+ Synopsis:
24
+ ---------
25
+
26
+ % amp add file.txt
27
+ edit...
28
+ % amp commit -m "updated the file"
29
+ % amp push
30
+
31
+ Nothing really changes from using the hg command. There are a few differences
32
+ here and there (see `amp help [COMMAND]`), but really, it's pretty much the same.
33
+
34
+ Right now, we're trying to simplify the docs, to make it easier to tell what things
35
+ are relevant to someone working with Amp. Most of our documentation is on our website,
36
+ but here's an example of some Ampfile code:
37
+
38
+ command "stats" do |c|
39
+ c.workflow :hg
40
+ c.desc "Prints how many commits each user has contributed"
41
+ c.on_run do |opts, args|
42
+ repo = opts[:repository]
43
+ users = Hash.new {|h, k| h[k] = 0}
44
+ repo.each do |changeset|
45
+ users[changeset.user.split("@").first] += 1
46
+ end
47
+ users.to_a.sort {|a,b| b[1] <=> a[1]}.each do |u,c|
48
+ puts "#{u}: #{c}"
49
+ end
50
+ end
51
+ end
52
+
53
+ In the on\_run handler, _repo_ is a LocalRepository object. Its #each method iterates over
54
+ ChangeSet objects, which store information about that particular commit, including which user
55
+ committed it. These objects will be most relevant to users, but we'll try to make things more
56
+ obvious as we refine our documentation. At the very least, we've tried to provide a useful
57
+ description of every method we can.
58
+
59
+ Example:
60
+ ________
61
+ % amp add file.txt
62
+ edit...
63
+ % amp commit -m "leethaxness"
64
+ % amp push
65
+
66
+ Nothing really changes from using the hg command. There are a few differences
67
+ here and there (see `amp help [COMMAND]`), but really, it's pretty much the same.
68
+
69
+ Using amp as a library:
70
+
71
+ require "amp"
72
+ include Amp
73
+
74
+ repo = Repositories::pick "/Users/ari/src/amp.code"
75
+ remote = Repositories::pick "https://user:password@bitbucket.org/carbonica/amp"
76
+
77
+ # makes a file...
78
+ Dir.chdir "/Users/ari/src/amp.code/"
79
+ open "testy.txt", "w" {|f| f.puts "hello, world!" }
80
+
81
+ # and add it to the repo!
82
+ repo.add "testy.txt"
83
+
84
+ # commit
85
+ repo.commit :message => 'blah'
86
+
87
+ # do some more things...
88
+
89
+ # pull and update...
90
+ result = repo.pull remote
91
+ result = repo.update if result.success?
92
+
93
+ (puts "You need to fix things!"; new_irb_session binding) unless result.success?
94
+ # type result[:unresolved] to get a list of conflicts
95
+
96
+ # and push!
97
+ repo.push remote
98
+
99
+ Everything here is really straight forward. Plus, if it's not, we've taken
100
+ the liberty to document the motherfucking shit out of motherfucking everything.
101
+ Hooray!
102
+
103
+ Requirements:
104
+ -------------
105
+ * Ruby
106
+ * Nothing else! (except rubygems to install - for now)
107
+
108
+ Install:
109
+ --------
110
+
111
+ sudo gem install amp --no-wrappers
112
+
113
+ License:
114
+ --------
115
+
116
+ See the LICENSE file.