ohloh_scm 2.5.1 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (657) hide show
  1. checksums.yaml +5 -5
  2. data/{bin → .bin}/accept_svn_ssl_certificate +0 -0
  3. data/.bin/check_scm_version +28 -0
  4. data/.bin/run-test +3 -0
  5. data/.bin/run-tests +3 -0
  6. data/{bin → .bin}/string_encoder +0 -0
  7. data/.git_hooks/pre-commit +20 -0
  8. data/.gitignore +1 -4
  9. data/.rubocop.yml +13 -0
  10. data/.ruby-version +1 -2
  11. data/.travis.yml +3 -2
  12. data/Dockerfile +8 -4
  13. data/Gemfile +14 -0
  14. data/Gemfile.lock +54 -0
  15. data/{COPYING → LICENSE.txt} +0 -0
  16. data/README.md +52 -116
  17. data/Rakefile +7 -29
  18. data/lib/ohloh_scm.rb +26 -32
  19. data/lib/ohloh_scm/activity.rb +38 -0
  20. data/lib/ohloh_scm/bzr.rb +12 -0
  21. data/lib/ohloh_scm/bzr/activity.rb +191 -0
  22. data/lib/ohloh_scm/bzr/scm.rb +24 -0
  23. data/lib/ohloh_scm/bzr/status.rb +8 -0
  24. data/lib/ohloh_scm/bzr/validation.rb +18 -0
  25. data/lib/ohloh_scm/commit.rb +44 -41
  26. data/lib/ohloh_scm/core.rb +22 -0
  27. data/lib/ohloh_scm/cvs.rb +11 -0
  28. data/lib/ohloh_scm/cvs/activity.rb +149 -0
  29. data/lib/ohloh_scm/cvs/scm.rb +149 -0
  30. data/lib/ohloh_scm/cvs/status.rb +14 -0
  31. data/lib/ohloh_scm/cvs/validation.rb +106 -0
  32. data/lib/ohloh_scm/data/git_ignore_list.rb +29 -0
  33. data/lib/ohloh_scm/diff.rb +42 -39
  34. data/lib/ohloh_scm/factory.rb +11 -0
  35. data/lib/ohloh_scm/git.rb +11 -0
  36. data/lib/ohloh_scm/git/activity.rb +317 -0
  37. data/lib/ohloh_scm/git/scm.rb +137 -0
  38. data/lib/ohloh_scm/git/status.rb +13 -0
  39. data/lib/ohloh_scm/git/validation.rb +18 -0
  40. data/lib/ohloh_scm/git_svn.rb +11 -0
  41. data/lib/ohloh_scm/git_svn/activity.rb +84 -0
  42. data/lib/ohloh_scm/git_svn/scm.rb +91 -0
  43. data/lib/ohloh_scm/git_svn/status.rb +8 -0
  44. data/lib/ohloh_scm/git_svn/validation.rb +8 -0
  45. data/lib/ohloh_scm/hg.rb +12 -0
  46. data/lib/ohloh_scm/hg/activity.rb +188 -0
  47. data/lib/ohloh_scm/hg/scm.rb +51 -0
  48. data/lib/ohloh_scm/hg/status.rb +8 -0
  49. data/lib/ohloh_scm/hg/validation.rb +18 -0
  50. data/lib/ohloh_scm/parser.rb +30 -0
  51. data/lib/ohloh_scm/parser/array_writer.rb +15 -0
  52. data/lib/ohloh_scm/parser/branch_number.rb +63 -0
  53. data/lib/ohloh_scm/{parsers → parser}/bzr_xml_parser.rb +65 -55
  54. data/lib/ohloh_scm/parser/cvs_parser.rb +161 -0
  55. data/lib/ohloh_scm/parser/git_parser.rb +128 -0
  56. data/lib/ohloh_scm/parser/hg_parser.rb +78 -0
  57. data/lib/ohloh_scm/{parsers → parser}/hg_style +0 -0
  58. data/lib/ohloh_scm/{parsers → parser}/hg_verbose_style +0 -0
  59. data/lib/ohloh_scm/parser/svn_parser.rb +83 -0
  60. data/lib/ohloh_scm/py_bridge.rb +9 -0
  61. data/lib/ohloh_scm/py_bridge/bzr_client.rb +28 -0
  62. data/lib/ohloh_scm/{adapters/bzrlib/bzrlib_pipe_server.py → py_bridge/bzr_server.py} +1 -1
  63. data/lib/ohloh_scm/py_bridge/hg_client.rb +30 -0
  64. data/lib/ohloh_scm/{adapters/hglib/server.py → py_bridge/hg_server.py} +0 -0
  65. data/lib/ohloh_scm/py_bridge/py_client.rb +45 -0
  66. data/lib/ohloh_scm/scm.rb +26 -0
  67. data/lib/ohloh_scm/status.rb +24 -0
  68. data/lib/ohloh_scm/string_extensions.rb +11 -0
  69. data/lib/ohloh_scm/svn.rb +11 -0
  70. data/lib/ohloh_scm/svn/activity.rb +95 -0
  71. data/lib/ohloh_scm/svn/scm.rb +95 -0
  72. data/lib/ohloh_scm/svn/status.rb +8 -0
  73. data/lib/ohloh_scm/svn/validation.rb +56 -0
  74. data/lib/ohloh_scm/system.rb +44 -0
  75. data/lib/ohloh_scm/validation.rb +83 -0
  76. data/lib/ohloh_scm/version.rb +8 -1
  77. data/ohloh_scm.gemspec +18 -15
  78. data/spec/.rubocop.yml +22 -0
  79. data/spec/benchmarks/hg_bzr_bash_vs_py_api.rb +39 -0
  80. data/spec/benchmarks/process_spawn_benchmark.rb +133 -0
  81. data/spec/helpers/assert_scm_attr_helper.rb +31 -0
  82. data/spec/helpers/commit_tokens_helper.rb +26 -0
  83. data/spec/helpers/generic_helper.rb +5 -0
  84. data/spec/helpers/repository_helper.rb +36 -0
  85. data/spec/helpers/system_helper.rb +25 -0
  86. data/spec/ohloh_scm/bzr/activity_spec.rb +460 -0
  87. data/spec/ohloh_scm/bzr/scm_spec.rb +17 -0
  88. data/spec/ohloh_scm/bzr/validation_spec.rb +37 -0
  89. data/spec/ohloh_scm/cvs/activity_spec.rb +93 -0
  90. data/spec/ohloh_scm/cvs/scm_spec.rb +112 -0
  91. data/spec/ohloh_scm/cvs/validation_spec.rb +78 -0
  92. data/spec/ohloh_scm/factory_spec.rb +16 -0
  93. data/spec/ohloh_scm/git/activity_spec.rb +402 -0
  94. data/spec/ohloh_scm/git/scm_spec.rb +57 -0
  95. data/spec/ohloh_scm/git/status_spec.rb +11 -0
  96. data/spec/ohloh_scm/git/validation_spec.rb +57 -0
  97. data/spec/ohloh_scm/git_svn/activity_spec.rb +89 -0
  98. data/spec/ohloh_scm/git_svn/scm_spec.rb +22 -0
  99. data/spec/ohloh_scm/hg/activity_spec.rb +323 -0
  100. data/spec/ohloh_scm/hg/scm_spec.rb +23 -0
  101. data/spec/ohloh_scm/hg/status_spec.rb +12 -0
  102. data/spec/ohloh_scm/hg/validation_spec.rb +32 -0
  103. data/spec/ohloh_scm/parser/array_writer_spec.rb +29 -0
  104. data/spec/ohloh_scm/parser/branch_number_spec.rb +126 -0
  105. data/spec/ohloh_scm/parser/cvs_parser_spec.rb +77 -0
  106. data/spec/ohloh_scm/parser/git_parser_spec.rb +102 -0
  107. data/spec/ohloh_scm/parser/hg_parser_spec.rb +194 -0
  108. data/spec/ohloh_scm/svn/activity_spec.rb +55 -0
  109. data/spec/ohloh_scm/svn/scm_spec.rb +75 -0
  110. data/spec/ohloh_scm/svn/validation_spec.rb +89 -0
  111. data/spec/ohloh_scm/svn_parser_spec.rb +146 -0
  112. data/spec/ohloh_scm/system_spec.rb +32 -0
  113. data/spec/ohloh_scm/version_spec.rb +9 -0
  114. data/{test/data → spec/raw_fixtures}/basic.rlog +0 -0
  115. data/{test/data → spec/raw_fixtures}/file_created_on_branch.rlog +0 -0
  116. data/{test/data → spec/raw_fixtures}/invalid-utf-word +0 -0
  117. data/{test/data → spec/raw_fixtures}/multiple_revisions.rlog +0 -0
  118. data/{test/data → spec/raw_fixtures}/sample-content +0 -0
  119. data/{test/data → spec/raw_fixtures}/simple.ohlog +1 -1
  120. data/{test/data → spec/raw_fixtures}/simple.svn_log +0 -0
  121. data/{test/data → spec/raw_fixtures}/simultaneous_checkins.rlog +0 -0
  122. data/{test/data → spec/raw_fixtures}/simultaneous_checkins_2.rlog +0 -0
  123. data/spec/scm_fixtures/bzr.tgz +0 -0
  124. data/{test/repositories → spec/scm_fixtures}/bzr_colon.tgz +0 -0
  125. data/spec/scm_fixtures/bzr_large.tgz +0 -0
  126. data/spec/scm_fixtures/bzr_with_authors.tgz +0 -0
  127. data/spec/scm_fixtures/bzr_with_branch.tgz +0 -0
  128. data/{test/repositories → spec/scm_fixtures}/bzr_with_invalid_encoding.tgz +0 -0
  129. data/spec/scm_fixtures/bzr_with_nested_branches.tgz +0 -0
  130. data/spec/scm_fixtures/bzr_with_subdirectories.tgz +0 -0
  131. data/{test/repositories → spec/scm_fixtures}/cvs.tgz +0 -0
  132. data/{test/repositories → spec/scm_fixtures}/git.tgz +0 -0
  133. data/{test/repositories → spec/scm_fixtures}/git_dupe_delete.tgz +0 -0
  134. data/{test/repositories → spec/scm_fixtures}/git_svn.tgz +0 -0
  135. data/{test/repositories → spec/scm_fixtures}/git_walk.tgz +0 -0
  136. data/{test/repositories → spec/scm_fixtures}/git_with_invalid_encoding.tgz +0 -0
  137. data/{test/repositories → spec/scm_fixtures}/git_with_master_tag.tgz +0 -0
  138. data/{test/repositories → spec/scm_fixtures}/git_with_multiple_branch.tgz +0 -0
  139. data/spec/scm_fixtures/git_with_mv.tgz +0 -0
  140. data/{test/repositories → spec/scm_fixtures}/git_with_null_merge.tgz +0 -0
  141. data/spec/scm_fixtures/git_with_submodules.tgz +0 -0
  142. data/{test/repositories → spec/scm_fixtures}/hg.tgz +0 -0
  143. data/{test/repositories → spec/scm_fixtures}/hg_dupe_delete.tgz +0 -0
  144. data/spec/scm_fixtures/hg_large.tgz +0 -0
  145. data/{test/repositories → spec/scm_fixtures}/hg_walk.tgz +0 -0
  146. data/{test/repositories → spec/scm_fixtures}/hg_with_invalid_encoding.tgz +0 -0
  147. data/spec/scm_fixtures/svn.tgz +0 -0
  148. data/spec/scm_fixtures/svn_subdir.tgz +0 -0
  149. data/spec/spec_helper.rb +32 -0
  150. data/spec/string_encoder_spec.rb +32 -0
  151. metadata +224 -1052
  152. data/bin/ohlog +0 -152
  153. data/lib/ohloh_scm/adapters/abstract/misc.rb +0 -12
  154. data/lib/ohloh_scm/adapters/abstract/sha1.rb +0 -48
  155. data/lib/ohloh_scm/adapters/abstract/system.rb +0 -60
  156. data/lib/ohloh_scm/adapters/abstract/validation.rb +0 -77
  157. data/lib/ohloh_scm/adapters/abstract_adapter.rb +0 -32
  158. data/lib/ohloh_scm/adapters/bzr/cat_file.rb +0 -25
  159. data/lib/ohloh_scm/adapters/bzr/commits.rb +0 -100
  160. data/lib/ohloh_scm/adapters/bzr/head.rb +0 -19
  161. data/lib/ohloh_scm/adapters/bzr/misc.rb +0 -61
  162. data/lib/ohloh_scm/adapters/bzr/pull.rb +0 -22
  163. data/lib/ohloh_scm/adapters/bzr/push.rb +0 -51
  164. data/lib/ohloh_scm/adapters/bzr/validation.rb +0 -16
  165. data/lib/ohloh_scm/adapters/bzr_adapter.rb +0 -15
  166. data/lib/ohloh_scm/adapters/bzrlib/bzrlib_pipe_client.rb +0 -71
  167. data/lib/ohloh_scm/adapters/bzrlib/cat_file.rb +0 -9
  168. data/lib/ohloh_scm/adapters/bzrlib/head.rb +0 -9
  169. data/lib/ohloh_scm/adapters/bzrlib_adapter.rb +0 -25
  170. data/lib/ohloh_scm/adapters/cvs/commits.rb +0 -97
  171. data/lib/ohloh_scm/adapters/cvs/misc.rb +0 -212
  172. data/lib/ohloh_scm/adapters/cvs/validation.rb +0 -77
  173. data/lib/ohloh_scm/adapters/cvs_adapter.rb +0 -18
  174. data/lib/ohloh_scm/adapters/factory.rb +0 -38
  175. data/lib/ohloh_scm/adapters/git/cat_file.rb +0 -16
  176. data/lib/ohloh_scm/adapters/git/commit_all.rb +0 -141
  177. data/lib/ohloh_scm/adapters/git/commits.rb +0 -122
  178. data/lib/ohloh_scm/adapters/git/head.rb +0 -21
  179. data/lib/ohloh_scm/adapters/git/misc.rb +0 -107
  180. data/lib/ohloh_scm/adapters/git/patch.rb +0 -9
  181. data/lib/ohloh_scm/adapters/git/pull.rb +0 -124
  182. data/lib/ohloh_scm/adapters/git/push.rb +0 -39
  183. data/lib/ohloh_scm/adapters/git/token.rb +0 -53
  184. data/lib/ohloh_scm/adapters/git/validation.rb +0 -50
  185. data/lib/ohloh_scm/adapters/git_adapter.rb +0 -18
  186. data/lib/ohloh_scm/adapters/git_svn/cat_file.rb +0 -22
  187. data/lib/ohloh_scm/adapters/git_svn/commits.rb +0 -57
  188. data/lib/ohloh_scm/adapters/git_svn/head.rb +0 -9
  189. data/lib/ohloh_scm/adapters/git_svn/misc.rb +0 -24
  190. data/lib/ohloh_scm/adapters/git_svn/pull.rb +0 -80
  191. data/lib/ohloh_scm/adapters/git_svn_adapter.rb +0 -13
  192. data/lib/ohloh_scm/adapters/hg/cat_file.rb +0 -28
  193. data/lib/ohloh_scm/adapters/hg/commits.rb +0 -112
  194. data/lib/ohloh_scm/adapters/hg/head.rb +0 -29
  195. data/lib/ohloh_scm/adapters/hg/misc.rb +0 -40
  196. data/lib/ohloh_scm/adapters/hg/patch.rb +0 -9
  197. data/lib/ohloh_scm/adapters/hg/pull.rb +0 -23
  198. data/lib/ohloh_scm/adapters/hg/push.rb +0 -51
  199. data/lib/ohloh_scm/adapters/hg/validation.rb +0 -26
  200. data/lib/ohloh_scm/adapters/hg_adapter.rb +0 -21
  201. data/lib/ohloh_scm/adapters/hglib/cat_file.rb +0 -14
  202. data/lib/ohloh_scm/adapters/hglib/client.rb +0 -62
  203. data/lib/ohloh_scm/adapters/hglib/head.rb +0 -9
  204. data/lib/ohloh_scm/adapters/hglib_adapter.rb +0 -25
  205. data/lib/ohloh_scm/adapters/svn/cat_file.rb +0 -19
  206. data/lib/ohloh_scm/adapters/svn/commits.rb +0 -195
  207. data/lib/ohloh_scm/adapters/svn/head.rb +0 -19
  208. data/lib/ohloh_scm/adapters/svn/misc.rb +0 -171
  209. data/lib/ohloh_scm/adapters/svn/patch.rb +0 -8
  210. data/lib/ohloh_scm/adapters/svn/pre-revprop-change +0 -2
  211. data/lib/ohloh_scm/adapters/svn/pull.rb +0 -77
  212. data/lib/ohloh_scm/adapters/svn/push.rb +0 -15
  213. data/lib/ohloh_scm/adapters/svn/validation.rb +0 -87
  214. data/lib/ohloh_scm/adapters/svn_adapter.rb +0 -17
  215. data/lib/ohloh_scm/adapters/svn_chain/cat_file.rb +0 -8
  216. data/lib/ohloh_scm/adapters/svn_chain/chain.rb +0 -100
  217. data/lib/ohloh_scm/adapters/svn_chain/commits.rb +0 -37
  218. data/lib/ohloh_scm/adapters/svn_chain_adapter.rb +0 -44
  219. data/lib/ohloh_scm/parsers/array_writer.rb +0 -19
  220. data/lib/ohloh_scm/parsers/branch_number.rb +0 -60
  221. data/lib/ohloh_scm/parsers/bzr_parser.rb +0 -128
  222. data/lib/ohloh_scm/parsers/cvs_parser.rb +0 -182
  223. data/lib/ohloh_scm/parsers/git_parser.rb +0 -67
  224. data/lib/ohloh_scm/parsers/git_styled_parser.rb +0 -95
  225. data/lib/ohloh_scm/parsers/hg_parser.rb +0 -63
  226. data/lib/ohloh_scm/parsers/hg_styled_parser.rb +0 -65
  227. data/lib/ohloh_scm/parsers/human_writer.rb +0 -49
  228. data/lib/ohloh_scm/parsers/parser.rb +0 -34
  229. data/lib/ohloh_scm/parsers/svn_parser.rb +0 -77
  230. data/lib/ohloh_scm/parsers/svn_xml_parser.rb +0 -62
  231. data/lib/ohloh_scm/parsers/xml_writer.rb +0 -62
  232. data/lib/ohloh_scm/scratch_dir.rb +0 -59
  233. data/lib/ohloh_scm/shellout.rb +0 -40
  234. data/log/.gitignore +0 -1
  235. data/test/bin/svn +0 -7
  236. data/test/data/basic.ohlog +0 -11
  237. data/test/data/branch_merge.bzr_xml_log +0 -87
  238. data/test/data/git_patch.diff +0 -19
  239. data/test/data/helloworld.log +0 -41
  240. data/test/data/hg_patch.diff +0 -9
  241. data/test/data/intelliglue.rlog +0 -1216
  242. data/test/data/multiple_commits.rlog +0 -64
  243. data/test/data/simple.bzr_xml_log +0 -41
  244. data/test/data/simple.svn_xml_log +0 -66
  245. data/test/data/svn_patch.diff +0 -9
  246. data/test/data/svn_with_invalid_encoding.log +0 -33
  247. data/test/repositories/bzr/.bzr/README +0 -3
  248. data/test/repositories/bzr/.bzr/branch-format +0 -1
  249. data/test/repositories/bzr/.bzr/branch/branch.conf +0 -0
  250. data/test/repositories/bzr/.bzr/branch/format +0 -1
  251. data/test/repositories/bzr/.bzr/branch/last-revision +0 -1
  252. data/test/repositories/bzr/.bzr/branch/tags +0 -1
  253. data/test/repositories/bzr/.bzr/checkout/conflicts +0 -1
  254. data/test/repositories/bzr/.bzr/checkout/dirstate +0 -0
  255. data/test/repositories/bzr/.bzr/checkout/format +0 -1
  256. data/test/repositories/bzr/.bzr/repository/format +0 -1
  257. data/test/repositories/bzr/.bzr/repository/indices/0428489d1a03d05c496c2c429fe96e90.iix +0 -0
  258. data/test/repositories/bzr/.bzr/repository/indices/0428489d1a03d05c496c2c429fe96e90.rix +0 -0
  259. data/test/repositories/bzr/.bzr/repository/indices/0428489d1a03d05c496c2c429fe96e90.six +0 -5
  260. data/test/repositories/bzr/.bzr/repository/indices/0428489d1a03d05c496c2c429fe96e90.tix +0 -0
  261. data/test/repositories/bzr/.bzr/repository/indices/62f9cada7c58bce361b9b852d180ff56.iix +0 -0
  262. data/test/repositories/bzr/.bzr/repository/indices/62f9cada7c58bce361b9b852d180ff56.rix +0 -0
  263. data/test/repositories/bzr/.bzr/repository/indices/62f9cada7c58bce361b9b852d180ff56.six +0 -5
  264. data/test/repositories/bzr/.bzr/repository/indices/62f9cada7c58bce361b9b852d180ff56.tix +0 -0
  265. data/test/repositories/bzr/.bzr/repository/indices/71af8bae249bcb824a4ff17c62029142.iix +0 -0
  266. data/test/repositories/bzr/.bzr/repository/indices/71af8bae249bcb824a4ff17c62029142.rix +0 -0
  267. data/test/repositories/bzr/.bzr/repository/indices/71af8bae249bcb824a4ff17c62029142.six +0 -5
  268. data/test/repositories/bzr/.bzr/repository/indices/71af8bae249bcb824a4ff17c62029142.tix +0 -0
  269. data/test/repositories/bzr/.bzr/repository/indices/7202eb77b81a80eca5296f317ed42149.iix +0 -0
  270. data/test/repositories/bzr/.bzr/repository/indices/7202eb77b81a80eca5296f317ed42149.rix +0 -0
  271. data/test/repositories/bzr/.bzr/repository/indices/7202eb77b81a80eca5296f317ed42149.six +0 -5
  272. data/test/repositories/bzr/.bzr/repository/indices/7202eb77b81a80eca5296f317ed42149.tix +0 -5
  273. data/test/repositories/bzr/.bzr/repository/indices/8a571ba35ee54cd133b71e967442fe17.iix +0 -0
  274. data/test/repositories/bzr/.bzr/repository/indices/8a571ba35ee54cd133b71e967442fe17.rix +0 -0
  275. data/test/repositories/bzr/.bzr/repository/indices/8a571ba35ee54cd133b71e967442fe17.six +0 -5
  276. data/test/repositories/bzr/.bzr/repository/indices/8a571ba35ee54cd133b71e967442fe17.tix +0 -0
  277. data/test/repositories/bzr/.bzr/repository/indices/a06b9c10004fc3e05affee8cf0a9febd.iix +0 -0
  278. data/test/repositories/bzr/.bzr/repository/indices/a06b9c10004fc3e05affee8cf0a9febd.rix +0 -0
  279. data/test/repositories/bzr/.bzr/repository/indices/a06b9c10004fc3e05affee8cf0a9febd.six +0 -5
  280. data/test/repositories/bzr/.bzr/repository/indices/a06b9c10004fc3e05affee8cf0a9febd.tix +0 -0
  281. data/test/repositories/bzr/.bzr/repository/indices/f35e1020b6a55c81b6d2fe4c7bcd4645.iix +0 -0
  282. data/test/repositories/bzr/.bzr/repository/indices/f35e1020b6a55c81b6d2fe4c7bcd4645.rix +0 -0
  283. data/test/repositories/bzr/.bzr/repository/indices/f35e1020b6a55c81b6d2fe4c7bcd4645.six +0 -5
  284. data/test/repositories/bzr/.bzr/repository/indices/f35e1020b6a55c81b6d2fe4c7bcd4645.tix +0 -0
  285. data/test/repositories/bzr/.bzr/repository/pack-names +0 -0
  286. data/test/repositories/bzr/.bzr/repository/packs/0428489d1a03d05c496c2c429fe96e90.pack +0 -0
  287. data/test/repositories/bzr/.bzr/repository/packs/62f9cada7c58bce361b9b852d180ff56.pack +0 -0
  288. data/test/repositories/bzr/.bzr/repository/packs/71af8bae249bcb824a4ff17c62029142.pack +0 -0
  289. data/test/repositories/bzr/.bzr/repository/packs/7202eb77b81a80eca5296f317ed42149.pack +0 -0
  290. data/test/repositories/bzr/.bzr/repository/packs/8a571ba35ee54cd133b71e967442fe17.pack +0 -0
  291. data/test/repositories/bzr/.bzr/repository/packs/a06b9c10004fc3e05affee8cf0a9febd.pack +0 -0
  292. data/test/repositories/bzr/.bzr/repository/packs/f35e1020b6a55c81b6d2fe4c7bcd4645.pack +0 -0
  293. data/test/repositories/bzr/.bzr/repository/upload/.gitignore +0 -1
  294. data/test/repositories/bzr/C/303/251dric.txt +0 -2
  295. data/test/repositories/bzr/file1.txt +0 -2
  296. data/test/repositories/bzr/file3.txt +0 -1
  297. data/test/repositories/bzr/file4.txt +0 -1
  298. data/test/repositories/bzr/file5.txt +0 -4
  299. data/test/repositories/bzr_hello_world/.bzr/README +0 -3
  300. data/test/repositories/bzr_hello_world/.bzr/branch-format +0 -1
  301. data/test/repositories/bzr_hello_world/.bzr/branch/branch.conf +0 -0
  302. data/test/repositories/bzr_hello_world/.bzr/branch/format +0 -1
  303. data/test/repositories/bzr_hello_world/.bzr/branch/last-revision +0 -1
  304. data/test/repositories/bzr_hello_world/.bzr/branch/tags +0 -0
  305. data/test/repositories/bzr_hello_world/.bzr/checkout/conflicts +0 -1
  306. data/test/repositories/bzr_hello_world/.bzr/checkout/dirstate +0 -0
  307. data/test/repositories/bzr_hello_world/.bzr/checkout/format +0 -1
  308. data/test/repositories/bzr_hello_world/.bzr/repository/format +0 -1
  309. data/test/repositories/bzr_hello_world/.bzr/repository/indices/a7cd0d6de5d8b3efdd5f61a4caeda296.iix +0 -0
  310. data/test/repositories/bzr_hello_world/.bzr/repository/indices/a7cd0d6de5d8b3efdd5f61a4caeda296.rix +0 -0
  311. data/test/repositories/bzr_hello_world/.bzr/repository/indices/a7cd0d6de5d8b3efdd5f61a4caeda296.six +0 -5
  312. data/test/repositories/bzr_hello_world/.bzr/repository/indices/a7cd0d6de5d8b3efdd5f61a4caeda296.tix +0 -0
  313. data/test/repositories/bzr_hello_world/.bzr/repository/indices/ed1e97c1213220a92ff857169867a7b3.iix +0 -0
  314. data/test/repositories/bzr_hello_world/.bzr/repository/indices/ed1e97c1213220a92ff857169867a7b3.rix +0 -0
  315. data/test/repositories/bzr_hello_world/.bzr/repository/indices/ed1e97c1213220a92ff857169867a7b3.six +0 -5
  316. data/test/repositories/bzr_hello_world/.bzr/repository/indices/ed1e97c1213220a92ff857169867a7b3.tix +0 -0
  317. data/test/repositories/bzr_hello_world/.bzr/repository/pack-names +0 -0
  318. data/test/repositories/bzr_hello_world/.bzr/repository/packs/a7cd0d6de5d8b3efdd5f61a4caeda296.pack +0 -0
  319. data/test/repositories/bzr_hello_world/.bzr/repository/packs/ed1e97c1213220a92ff857169867a7b3.pack +0 -0
  320. data/test/repositories/bzr_hello_world/helloworld.c +0 -6
  321. data/test/repositories/bzr_with_authors/.bzr/README +0 -3
  322. data/test/repositories/bzr_with_authors/.bzr/branch-format +0 -1
  323. data/test/repositories/bzr_with_authors/.bzr/branch/branch.conf +0 -0
  324. data/test/repositories/bzr_with_authors/.bzr/branch/format +0 -1
  325. data/test/repositories/bzr_with_authors/.bzr/branch/last-revision +0 -1
  326. data/test/repositories/bzr_with_authors/.bzr/branch/tags +0 -0
  327. data/test/repositories/bzr_with_authors/.bzr/checkout/conflicts +0 -1
  328. data/test/repositories/bzr_with_authors/.bzr/checkout/dirstate +0 -0
  329. data/test/repositories/bzr_with_authors/.bzr/checkout/format +0 -1
  330. data/test/repositories/bzr_with_authors/.bzr/checkout/views +0 -0
  331. data/test/repositories/bzr_with_authors/.bzr/repository/format +0 -1
  332. data/test/repositories/bzr_with_authors/.bzr/repository/indices/1326ecee2f4f69991771137c5307689a.cix +0 -0
  333. data/test/repositories/bzr_with_authors/.bzr/repository/indices/1326ecee2f4f69991771137c5307689a.iix +0 -0
  334. data/test/repositories/bzr_with_authors/.bzr/repository/indices/1326ecee2f4f69991771137c5307689a.rix +0 -6
  335. data/test/repositories/bzr_with_authors/.bzr/repository/indices/1326ecee2f4f69991771137c5307689a.six +0 -5
  336. data/test/repositories/bzr_with_authors/.bzr/repository/indices/1326ecee2f4f69991771137c5307689a.tix +0 -0
  337. data/test/repositories/bzr_with_authors/.bzr/repository/indices/adf730b6cf7c7959afcedb87e155654d.cix +0 -0
  338. data/test/repositories/bzr_with_authors/.bzr/repository/indices/adf730b6cf7c7959afcedb87e155654d.iix +0 -0
  339. data/test/repositories/bzr_with_authors/.bzr/repository/indices/adf730b6cf7c7959afcedb87e155654d.rix +0 -0
  340. data/test/repositories/bzr_with_authors/.bzr/repository/indices/adf730b6cf7c7959afcedb87e155654d.six +0 -5
  341. data/test/repositories/bzr_with_authors/.bzr/repository/indices/adf730b6cf7c7959afcedb87e155654d.tix +0 -6
  342. data/test/repositories/bzr_with_authors/.bzr/repository/indices/d2613fcfb5e48e79073b96270782f95c.cix +0 -0
  343. data/test/repositories/bzr_with_authors/.bzr/repository/indices/d2613fcfb5e48e79073b96270782f95c.iix +0 -0
  344. data/test/repositories/bzr_with_authors/.bzr/repository/indices/d2613fcfb5e48e79073b96270782f95c.rix +0 -0
  345. data/test/repositories/bzr_with_authors/.bzr/repository/indices/d2613fcfb5e48e79073b96270782f95c.six +0 -5
  346. data/test/repositories/bzr_with_authors/.bzr/repository/indices/d2613fcfb5e48e79073b96270782f95c.tix +0 -0
  347. data/test/repositories/bzr_with_authors/.bzr/repository/pack-names +0 -0
  348. data/test/repositories/bzr_with_authors/.bzr/repository/packs/1326ecee2f4f69991771137c5307689a.pack +0 -0
  349. data/test/repositories/bzr_with_authors/.bzr/repository/packs/adf730b6cf7c7959afcedb87e155654d.pack +0 -0
  350. data/test/repositories/bzr_with_authors/.bzr/repository/packs/d2613fcfb5e48e79073b96270782f95c.pack +0 -0
  351. data/test/repositories/bzr_with_authors/test.txt +0 -1
  352. data/test/repositories/bzr_with_branch/.bzr/README +0 -3
  353. data/test/repositories/bzr_with_branch/.bzr/branch-format +0 -1
  354. data/test/repositories/bzr_with_branch/.bzr/branch/branch.conf +0 -1
  355. data/test/repositories/bzr_with_branch/.bzr/branch/format +0 -1
  356. data/test/repositories/bzr_with_branch/.bzr/branch/last-revision +0 -1
  357. data/test/repositories/bzr_with_branch/.bzr/branch/tags +0 -0
  358. data/test/repositories/bzr_with_branch/.bzr/checkout/conflicts +0 -1
  359. data/test/repositories/bzr_with_branch/.bzr/checkout/dirstate +0 -0
  360. data/test/repositories/bzr_with_branch/.bzr/checkout/format +0 -1
  361. data/test/repositories/bzr_with_branch/.bzr/checkout/merge-hashes +0 -3
  362. data/test/repositories/bzr_with_branch/.bzr/repository/format +0 -1
  363. data/test/repositories/bzr_with_branch/.bzr/repository/indices/3336f250dbe86a7eec2de4c1b1f97db7.iix +0 -0
  364. data/test/repositories/bzr_with_branch/.bzr/repository/indices/3336f250dbe86a7eec2de4c1b1f97db7.rix +0 -0
  365. data/test/repositories/bzr_with_branch/.bzr/repository/indices/3336f250dbe86a7eec2de4c1b1f97db7.six +0 -5
  366. data/test/repositories/bzr_with_branch/.bzr/repository/indices/3336f250dbe86a7eec2de4c1b1f97db7.tix +0 -5
  367. data/test/repositories/bzr_with_branch/.bzr/repository/indices/47cfe65310e6d462bb87a68fff0bc162.iix +0 -0
  368. data/test/repositories/bzr_with_branch/.bzr/repository/indices/47cfe65310e6d462bb87a68fff0bc162.rix +0 -0
  369. data/test/repositories/bzr_with_branch/.bzr/repository/indices/47cfe65310e6d462bb87a68fff0bc162.six +0 -5
  370. data/test/repositories/bzr_with_branch/.bzr/repository/indices/47cfe65310e6d462bb87a68fff0bc162.tix +0 -0
  371. data/test/repositories/bzr_with_branch/.bzr/repository/indices/64e98edbf1aebe6f532f2f93b24eead8.iix +0 -0
  372. data/test/repositories/bzr_with_branch/.bzr/repository/indices/64e98edbf1aebe6f532f2f93b24eead8.rix +0 -0
  373. data/test/repositories/bzr_with_branch/.bzr/repository/indices/64e98edbf1aebe6f532f2f93b24eead8.six +0 -5
  374. data/test/repositories/bzr_with_branch/.bzr/repository/indices/64e98edbf1aebe6f532f2f93b24eead8.tix +0 -0
  375. data/test/repositories/bzr_with_branch/.bzr/repository/indices/8008794e258fc3fa4be68d538312a91c.iix +0 -0
  376. data/test/repositories/bzr_with_branch/.bzr/repository/indices/8008794e258fc3fa4be68d538312a91c.rix +0 -0
  377. data/test/repositories/bzr_with_branch/.bzr/repository/indices/8008794e258fc3fa4be68d538312a91c.six +0 -5
  378. data/test/repositories/bzr_with_branch/.bzr/repository/indices/8008794e258fc3fa4be68d538312a91c.tix +0 -0
  379. data/test/repositories/bzr_with_branch/.bzr/repository/pack-names +0 -0
  380. data/test/repositories/bzr_with_branch/.bzr/repository/packs/3336f250dbe86a7eec2de4c1b1f97db7.pack +0 -0
  381. data/test/repositories/bzr_with_branch/.bzr/repository/packs/47cfe65310e6d462bb87a68fff0bc162.pack +0 -0
  382. data/test/repositories/bzr_with_branch/.bzr/repository/packs/64e98edbf1aebe6f532f2f93b24eead8.pack +0 -0
  383. data/test/repositories/bzr_with_branch/.bzr/repository/packs/8008794e258fc3fa4be68d538312a91c.pack +0 -0
  384. data/test/repositories/bzr_with_branch/goodbyeworld.c +0 -5
  385. data/test/repositories/bzr_with_branch/helloworld.c +0 -6
  386. data/test/repositories/bzr_with_nested_branches/.bzr/README +0 -3
  387. data/test/repositories/bzr_with_nested_branches/.bzr/branch-format +0 -1
  388. data/test/repositories/bzr_with_nested_branches/.bzr/branch/branch.conf +0 -1
  389. data/test/repositories/bzr_with_nested_branches/.bzr/branch/format +0 -1
  390. data/test/repositories/bzr_with_nested_branches/.bzr/branch/last-revision +0 -1
  391. data/test/repositories/bzr_with_nested_branches/.bzr/branch/tags +0 -0
  392. data/test/repositories/bzr_with_nested_branches/.bzr/checkout/conflicts +0 -1
  393. data/test/repositories/bzr_with_nested_branches/.bzr/checkout/dirstate +0 -0
  394. data/test/repositories/bzr_with_nested_branches/.bzr/checkout/format +0 -1
  395. data/test/repositories/bzr_with_nested_branches/.bzr/checkout/merge-hashes +0 -6
  396. data/test/repositories/bzr_with_nested_branches/.bzr/repository/format +0 -1
  397. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/0428489d1a03d05c496c2c429fe96e90.iix +0 -0
  398. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/0428489d1a03d05c496c2c429fe96e90.rix +0 -0
  399. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/0428489d1a03d05c496c2c429fe96e90.six +0 -5
  400. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/0428489d1a03d05c496c2c429fe96e90.tix +0 -0
  401. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/30fcaac048e328a7727156986055f6e8.iix +0 -0
  402. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/30fcaac048e328a7727156986055f6e8.rix +0 -0
  403. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/30fcaac048e328a7727156986055f6e8.six +0 -5
  404. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/30fcaac048e328a7727156986055f6e8.tix +0 -0
  405. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/673cc297ed321f667e1d8d4fff600829.iix +0 -0
  406. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/673cc297ed321f667e1d8d4fff600829.rix +0 -0
  407. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/673cc297ed321f667e1d8d4fff600829.six +0 -5
  408. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/673cc297ed321f667e1d8d4fff600829.tix +0 -0
  409. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/71af8bae249bcb824a4ff17c62029142.iix +0 -0
  410. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/71af8bae249bcb824a4ff17c62029142.rix +0 -0
  411. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/71af8bae249bcb824a4ff17c62029142.six +0 -5
  412. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/71af8bae249bcb824a4ff17c62029142.tix +0 -0
  413. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/7202eb77b81a80eca5296f317ed42149.iix +0 -0
  414. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/7202eb77b81a80eca5296f317ed42149.rix +0 -0
  415. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/7202eb77b81a80eca5296f317ed42149.six +0 -5
  416. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/7202eb77b81a80eca5296f317ed42149.tix +0 -5
  417. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/8a571ba35ee54cd133b71e967442fe17.iix +0 -0
  418. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/8a571ba35ee54cd133b71e967442fe17.rix +0 -0
  419. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/8a571ba35ee54cd133b71e967442fe17.six +0 -5
  420. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/8a571ba35ee54cd133b71e967442fe17.tix +0 -0
  421. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/a06b9c10004fc3e05affee8cf0a9febd.iix +0 -0
  422. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/a06b9c10004fc3e05affee8cf0a9febd.rix +0 -0
  423. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/a06b9c10004fc3e05affee8cf0a9febd.six +0 -5
  424. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/a06b9c10004fc3e05affee8cf0a9febd.tix +0 -0
  425. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/da6c79a024c70fd6831e323430a96cc8.iix +0 -0
  426. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/da6c79a024c70fd6831e323430a96cc8.rix +0 -0
  427. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/da6c79a024c70fd6831e323430a96cc8.six +0 -5
  428. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/da6c79a024c70fd6831e323430a96cc8.tix +0 -5
  429. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/f35e1020b6a55c81b6d2fe4c7bcd4645.iix +0 -0
  430. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/f35e1020b6a55c81b6d2fe4c7bcd4645.rix +0 -0
  431. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/f35e1020b6a55c81b6d2fe4c7bcd4645.six +0 -5
  432. data/test/repositories/bzr_with_nested_branches/.bzr/repository/indices/f35e1020b6a55c81b6d2fe4c7bcd4645.tix +0 -0
  433. data/test/repositories/bzr_with_nested_branches/.bzr/repository/pack-names +0 -0
  434. data/test/repositories/bzr_with_nested_branches/.bzr/repository/packs/0428489d1a03d05c496c2c429fe96e90.pack +0 -0
  435. data/test/repositories/bzr_with_nested_branches/.bzr/repository/packs/30fcaac048e328a7727156986055f6e8.pack +0 -0
  436. data/test/repositories/bzr_with_nested_branches/.bzr/repository/packs/673cc297ed321f667e1d8d4fff600829.pack +0 -0
  437. data/test/repositories/bzr_with_nested_branches/.bzr/repository/packs/71af8bae249bcb824a4ff17c62029142.pack +0 -0
  438. data/test/repositories/bzr_with_nested_branches/.bzr/repository/packs/7202eb77b81a80eca5296f317ed42149.pack +0 -0
  439. data/test/repositories/bzr_with_nested_branches/.bzr/repository/packs/8a571ba35ee54cd133b71e967442fe17.pack +0 -0
  440. data/test/repositories/bzr_with_nested_branches/.bzr/repository/packs/a06b9c10004fc3e05affee8cf0a9febd.pack +0 -0
  441. data/test/repositories/bzr_with_nested_branches/.bzr/repository/packs/da6c79a024c70fd6831e323430a96cc8.pack +0 -0
  442. data/test/repositories/bzr_with_nested_branches/.bzr/repository/packs/f35e1020b6a55c81b6d2fe4c7bcd4645.pack +0 -0
  443. data/test/repositories/bzr_with_nested_branches/.bzr/repository/upload/.gitignore +0 -1
  444. data/test/repositories/bzr_with_nested_branches/file1.txt +0 -2
  445. data/test/repositories/bzr_with_nested_branches/file3.txt +0 -1
  446. data/test/repositories/bzr_with_nested_branches/file4.txt +0 -1
  447. data/test/repositories/bzr_with_nested_branches/file5.txt +0 -4
  448. data/test/repositories/bzr_with_nested_branches/file6.txt +0 -2
  449. data/test/repositories/bzr_with_nested_branches/file7.txt +0 -2
  450. data/test/repositories/bzr_with_subdirectories/.bzr/README +0 -3
  451. data/test/repositories/bzr_with_subdirectories/.bzr/branch-format +0 -1
  452. data/test/repositories/bzr_with_subdirectories/.bzr/branch/branch.conf +0 -0
  453. data/test/repositories/bzr_with_subdirectories/.bzr/branch/format +0 -1
  454. data/test/repositories/bzr_with_subdirectories/.bzr/branch/last-revision +0 -1
  455. data/test/repositories/bzr_with_subdirectories/.bzr/branch/tags +0 -0
  456. data/test/repositories/bzr_with_subdirectories/.bzr/checkout/conflicts +0 -1
  457. data/test/repositories/bzr_with_subdirectories/.bzr/checkout/dirstate +0 -0
  458. data/test/repositories/bzr_with_subdirectories/.bzr/checkout/format +0 -1
  459. data/test/repositories/bzr_with_subdirectories/.bzr/repository/format +0 -1
  460. data/test/repositories/bzr_with_subdirectories/.bzr/repository/indices/6eb92b11d9f811881dd08e0ca71e136d.iix +0 -0
  461. data/test/repositories/bzr_with_subdirectories/.bzr/repository/indices/6eb92b11d9f811881dd08e0ca71e136d.rix +0 -0
  462. data/test/repositories/bzr_with_subdirectories/.bzr/repository/indices/6eb92b11d9f811881dd08e0ca71e136d.six +0 -5
  463. data/test/repositories/bzr_with_subdirectories/.bzr/repository/indices/6eb92b11d9f811881dd08e0ca71e136d.tix +0 -0
  464. data/test/repositories/bzr_with_subdirectories/.bzr/repository/pack-names +0 -0
  465. data/test/repositories/bzr_with_subdirectories/.bzr/repository/packs/6eb92b11d9f811881dd08e0ca71e136d.pack +0 -0
  466. data/test/repositories/bzr_with_subdirectories/foo/helloworld.c +0 -0
  467. data/test/repositories/deep_svn/README.txt +0 -5
  468. data/test/repositories/deep_svn/conf/authz +0 -21
  469. data/test/repositories/deep_svn/conf/passwd +0 -8
  470. data/test/repositories/deep_svn/conf/svnserve.conf +0 -30
  471. data/test/repositories/deep_svn/db/current +0 -1
  472. data/test/repositories/deep_svn/db/format +0 -1
  473. data/test/repositories/deep_svn/db/fs-type +0 -1
  474. data/test/repositories/deep_svn/db/revprops/0 +0 -5
  475. data/test/repositories/deep_svn/db/revprops/1 +0 -14
  476. data/test/repositories/deep_svn/db/revprops/2 +0 -14
  477. data/test/repositories/deep_svn/db/revprops/3 +0 -14
  478. data/test/repositories/deep_svn/db/revprops/4 +0 -14
  479. data/test/repositories/deep_svn/db/revs/0 +0 -11
  480. data/test/repositories/deep_svn/db/revs/1 +0 -122
  481. data/test/repositories/deep_svn/db/revs/2 +0 -19
  482. data/test/repositories/deep_svn/db/revs/3 +0 -44
  483. data/test/repositories/deep_svn/db/revs/4 +0 -48
  484. data/test/repositories/deep_svn/db/uuid +0 -1
  485. data/test/repositories/deep_svn/db/write-lock +0 -0
  486. data/test/repositories/deep_svn/format +0 -1
  487. data/test/repositories/deep_svn/hooks/post-commit.tmpl +0 -51
  488. data/test/repositories/deep_svn/hooks/post-lock.tmpl +0 -44
  489. data/test/repositories/deep_svn/hooks/post-revprop-change.tmpl +0 -56
  490. data/test/repositories/deep_svn/hooks/post-unlock.tmpl +0 -42
  491. data/test/repositories/deep_svn/hooks/pre-commit.tmpl +0 -70
  492. data/test/repositories/deep_svn/hooks/pre-lock.tmpl +0 -64
  493. data/test/repositories/deep_svn/hooks/pre-revprop-change.tmpl +0 -66
  494. data/test/repositories/deep_svn/hooks/pre-unlock.tmpl +0 -60
  495. data/test/repositories/deep_svn/hooks/start-commit.tmpl +0 -54
  496. data/test/repositories/deep_svn/locks/db-logs.lock +0 -3
  497. data/test/repositories/deep_svn/locks/db.lock +0 -3
  498. data/test/repositories/git_with_empty_merge.tgz +0 -0
  499. data/test/repositories/svn/README.txt +0 -5
  500. data/test/repositories/svn/conf/authz +0 -21
  501. data/test/repositories/svn/conf/passwd +0 -8
  502. data/test/repositories/svn/conf/svnserve.conf +0 -30
  503. data/test/repositories/svn/db/current +0 -1
  504. data/test/repositories/svn/db/format +0 -1
  505. data/test/repositories/svn/db/fs-type +0 -1
  506. data/test/repositories/svn/db/revprops/0 +0 -5
  507. data/test/repositories/svn/db/revprops/1 +0 -14
  508. data/test/repositories/svn/db/revprops/2 +0 -13
  509. data/test/repositories/svn/db/revprops/3 +0 -13
  510. data/test/repositories/svn/db/revprops/4 +0 -13
  511. data/test/repositories/svn/db/revprops/5 +0 -13
  512. data/test/repositories/svn/db/revprops/6 +0 -12
  513. data/test/repositories/svn/db/revs/0 +0 -11
  514. data/test/repositories/svn/db/revs/1 +0 -0
  515. data/test/repositories/svn/db/revs/2 +0 -0
  516. data/test/repositories/svn/db/revs/3 +0 -0
  517. data/test/repositories/svn/db/revs/4 +0 -0
  518. data/test/repositories/svn/db/revs/5 +0 -64
  519. data/test/repositories/svn/db/revs/6 +0 -50
  520. data/test/repositories/svn/db/uuid +0 -1
  521. data/test/repositories/svn/db/write-lock +0 -0
  522. data/test/repositories/svn/format +0 -1
  523. data/test/repositories/svn/hooks/post-commit.tmpl +0 -51
  524. data/test/repositories/svn/hooks/post-lock.tmpl +0 -44
  525. data/test/repositories/svn/hooks/post-revprop-change.tmpl +0 -56
  526. data/test/repositories/svn/hooks/post-unlock.tmpl +0 -42
  527. data/test/repositories/svn/hooks/pre-commit.tmpl +0 -70
  528. data/test/repositories/svn/hooks/pre-lock.tmpl +0 -64
  529. data/test/repositories/svn/hooks/pre-revprop-change +0 -67
  530. data/test/repositories/svn/hooks/pre-unlock.tmpl +0 -60
  531. data/test/repositories/svn/hooks/start-commit.tmpl +0 -54
  532. data/test/repositories/svn/locks/db-logs.lock +0 -3
  533. data/test/repositories/svn/locks/db.lock +0 -3
  534. data/test/repositories/svn_empty/README.txt +0 -5
  535. data/test/repositories/svn_empty/conf/authz +0 -32
  536. data/test/repositories/svn_empty/conf/hooks-env.tmpl +0 -19
  537. data/test/repositories/svn_empty/conf/passwd +0 -8
  538. data/test/repositories/svn_empty/conf/svnserve.conf +0 -76
  539. data/test/repositories/svn_empty/db/current +0 -1
  540. data/test/repositories/svn_empty/db/format +0 -2
  541. data/test/repositories/svn_empty/db/fs-type +0 -1
  542. data/test/repositories/svn_empty/db/fsfs.conf +0 -125
  543. data/test/repositories/svn_empty/db/min-unpacked-rev +0 -1
  544. data/test/repositories/svn_empty/db/revprops/0/0 +0 -5
  545. data/test/repositories/svn_empty/db/revs/0/0 +0 -11
  546. data/test/repositories/svn_empty/db/txn-current +0 -1
  547. data/test/repositories/svn_empty/db/txn-current-lock +0 -0
  548. data/test/repositories/svn_empty/db/uuid +0 -1
  549. data/test/repositories/svn_empty/db/write-lock +0 -0
  550. data/test/repositories/svn_empty/format +0 -1
  551. data/test/repositories/svn_empty/hooks/post-commit.tmpl +0 -52
  552. data/test/repositories/svn_empty/hooks/post-lock.tmpl +0 -45
  553. data/test/repositories/svn_empty/hooks/post-revprop-change.tmpl +0 -57
  554. data/test/repositories/svn_empty/hooks/post-unlock.tmpl +0 -43
  555. data/test/repositories/svn_empty/hooks/pre-commit.tmpl +0 -85
  556. data/test/repositories/svn_empty/hooks/pre-lock.tmpl +0 -73
  557. data/test/repositories/svn_empty/hooks/pre-revprop-change.tmpl +0 -66
  558. data/test/repositories/svn_empty/hooks/pre-unlock.tmpl +0 -65
  559. data/test/repositories/svn_empty/hooks/start-commit.tmpl +0 -74
  560. data/test/repositories/svn_empty/locks/db-logs.lock +0 -3
  561. data/test/repositories/svn_empty/locks/db.lock +0 -3
  562. data/test/repositories/svn_with_branching.tgz +0 -0
  563. data/test/repositories/svn_with_invalid_encoding.tgz +0 -0
  564. data/test/repositories/svn_with_tree_move/README.txt +0 -5
  565. data/test/repositories/svn_with_tree_move/conf/authz +0 -21
  566. data/test/repositories/svn_with_tree_move/conf/passwd +0 -8
  567. data/test/repositories/svn_with_tree_move/conf/svnserve.conf +0 -30
  568. data/test/repositories/svn_with_tree_move/db/current +0 -1
  569. data/test/repositories/svn_with_tree_move/db/format +0 -1
  570. data/test/repositories/svn_with_tree_move/db/fs-type +0 -1
  571. data/test/repositories/svn_with_tree_move/db/revprops/0 +0 -5
  572. data/test/repositories/svn_with_tree_move/db/revprops/1 +0 -13
  573. data/test/repositories/svn_with_tree_move/db/revprops/2 +0 -13
  574. data/test/repositories/svn_with_tree_move/db/revs/0 +0 -11
  575. data/test/repositories/svn_with_tree_move/db/revs/1 +0 -0
  576. data/test/repositories/svn_with_tree_move/db/revs/2 +0 -44
  577. data/test/repositories/svn_with_tree_move/db/uuid +0 -1
  578. data/test/repositories/svn_with_tree_move/db/write-lock +0 -0
  579. data/test/repositories/svn_with_tree_move/format +0 -1
  580. data/test/repositories/svn_with_tree_move/hooks/post-commit.tmpl +0 -51
  581. data/test/repositories/svn_with_tree_move/hooks/post-lock.tmpl +0 -44
  582. data/test/repositories/svn_with_tree_move/hooks/post-revprop-change.tmpl +0 -56
  583. data/test/repositories/svn_with_tree_move/hooks/post-unlock.tmpl +0 -42
  584. data/test/repositories/svn_with_tree_move/hooks/pre-commit.tmpl +0 -70
  585. data/test/repositories/svn_with_tree_move/hooks/pre-lock.tmpl +0 -64
  586. data/test/repositories/svn_with_tree_move/hooks/pre-revprop-change.tmpl +0 -66
  587. data/test/repositories/svn_with_tree_move/hooks/pre-unlock.tmpl +0 -60
  588. data/test/repositories/svn_with_tree_move/hooks/start-commit.tmpl +0 -54
  589. data/test/repositories/svn_with_tree_move/locks/db-logs.lock +0 -3
  590. data/test/repositories/svn_with_tree_move/locks/db.lock +0 -3
  591. data/test/test_helper.rb +0 -127
  592. data/test/unit/abstract_adapter_test.rb +0 -106
  593. data/test/unit/adapter_factory_test.rb +0 -67
  594. data/test/unit/array_writer_test.rb +0 -33
  595. data/test/unit/bzr_cat_file_test.rb +0 -56
  596. data/test/unit/bzr_commits_test.rb +0 -388
  597. data/test/unit/bzr_head_test.rb +0 -18
  598. data/test/unit/bzr_misc_test.rb +0 -62
  599. data/test/unit/bzr_parser_test.rb +0 -483
  600. data/test/unit/bzr_pull_test.rb +0 -31
  601. data/test/unit/bzr_push_test.rb +0 -61
  602. data/test/unit/bzr_validation_test.rb +0 -61
  603. data/test/unit/bzr_xml_parser_test.rb +0 -409
  604. data/test/unit/bzrlib_cat_file_test.rb +0 -56
  605. data/test/unit/bzrlib_head_test.rb +0 -18
  606. data/test/unit/cvs_branch_number_test.rb +0 -130
  607. data/test/unit/cvs_commits_test.rb +0 -52
  608. data/test/unit/cvs_convert_test.rb +0 -30
  609. data/test/unit/cvs_misc_test.rb +0 -82
  610. data/test/unit/cvs_parser_test.rb +0 -94
  611. data/test/unit/cvs_validation_test.rb +0 -148
  612. data/test/unit/git_cat_file_test.rb +0 -21
  613. data/test/unit/git_commit_all_test.rb +0 -34
  614. data/test/unit/git_commits_test.rb +0 -179
  615. data/test/unit/git_head_test.rb +0 -26
  616. data/test/unit/git_log_parser_test.rb +0 -221
  617. data/test/unit/git_misc_test.rb +0 -100
  618. data/test/unit/git_parser_test.rb +0 -59
  619. data/test/unit/git_patch_test.rb +0 -14
  620. data/test/unit/git_pull_test.rb +0 -50
  621. data/test/unit/git_push_test.rb +0 -46
  622. data/test/unit/git_rev_list_test.rb +0 -89
  623. data/test/unit/git_styled_parser_test.rb +0 -103
  624. data/test/unit/git_svn_cat_file_test.rb +0 -57
  625. data/test/unit/git_svn_commits_test.rb +0 -37
  626. data/test/unit/git_svn_pull_test.rb +0 -51
  627. data/test/unit/git_token_test.rb +0 -45
  628. data/test/unit/git_validation_test.rb +0 -93
  629. data/test/unit/hg_cat_file_test.rb +0 -47
  630. data/test/unit/hg_commits_test.rb +0 -220
  631. data/test/unit/hg_head_test.rb +0 -24
  632. data/test/unit/hg_misc_test.rb +0 -48
  633. data/test/unit/hg_parser_test.rb +0 -184
  634. data/test/unit/hg_patch_test.rb +0 -14
  635. data/test/unit/hg_pull_test.rb +0 -29
  636. data/test/unit/hg_push_test.rb +0 -59
  637. data/test/unit/hg_rev_list_test.rb +0 -63
  638. data/test/unit/hg_validation_test.rb +0 -60
  639. data/test/unit/hglib_cat_file_test.rb +0 -47
  640. data/test/unit/hglib_head_test.rb +0 -18
  641. data/test/unit/ohlog_command_line_test.rb +0 -36
  642. data/test/unit/shellout_test.rb +0 -26
  643. data/test/unit/string_encoder_command_line_test.rb +0 -27
  644. data/test/unit/svn_cat_file_test.rb +0 -22
  645. data/test/unit/svn_chain_cat_file_test.rb +0 -24
  646. data/test/unit/svn_chain_commits_test.rb +0 -176
  647. data/test/unit/svn_chain_test.rb +0 -77
  648. data/test/unit/svn_commits_test.rb +0 -275
  649. data/test/unit/svn_convert_test.rb +0 -28
  650. data/test/unit/svn_head_test.rb +0 -27
  651. data/test/unit/svn_misc_test.rb +0 -142
  652. data/test/unit/svn_parser_test.rb +0 -155
  653. data/test/unit/svn_patch_test.rb +0 -14
  654. data/test/unit/svn_pull_test.rb +0 -60
  655. data/test/unit/svn_push_test.rb +0 -40
  656. data/test/unit/svn_validation_test.rb +0 -176
  657. data/test/unit/svn_xml_parser_test.rb +0 -45
data/ohloh_scm.gemspec CHANGED
@@ -1,22 +1,25 @@
1
- $:.push File.expand_path("../lib", __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH << File.expand_path('lib', __dir__)
2
4
  require 'ohloh_scm/version'
3
5
 
4
6
  Gem::Specification.new do |gem|
5
7
  gem.name = 'ohloh_scm'
6
8
  gem.version = OhlohScm::Version::STRING
7
- gem.authors = ["BlackDuck Software"]
8
- gem.email = ["info@openhub.net"]
9
- gem.summary = %[Source Control Management]
10
- gem.description = %[The Ohloh source control management library for interacting with Git, SVN, CVS, Hg and Bzr repositories.]
11
- gem.homepage = %[https://github.com/blackducksw/ohloh_scm/]
12
- gem.license = %[GPL-2.0]
13
-
14
- gem.files = `git ls-files -z`.force_encoding('utf-8').split("\x0")
15
- gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
16
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
- gem.require_paths = %w(lib)
9
+ gem.authors = ['OpenHub Team at Synopsys']
10
+ gem.email = ['info@openhub.net']
11
+ gem.summary = 'Source Control Management'
12
+ gem.description = 'The OpenHub source control management library for \
13
+ interacting with Git, SVN, CVS, Hg and Bzr repositories.'
14
+ gem.homepage = 'https://github.com/blackducksoftware/ohloh_scm/'
15
+ gem.license = 'GPL-2.0'
18
16
 
19
- gem.add_runtime_dependency 'posix-spawn', '~> 0.3'
20
- gem.add_runtime_dependency 'nokogiri', '~> 1.8', '>= 1.8.1'
21
- gem.add_runtime_dependency 'test-unit', '~> 3.2', '>= 3.2.7'
17
+ gem.files = `git ls-files -z`.split("\x0")
18
+ gem.test_files = gem.files.grep(/^spec\//)
19
+ gem.require_paths = %w[lib]
20
+ gem.post_install_message = "Ohloh SCM is depending on Git #{OhlohScm::Version::GIT}, "\
21
+ "SVN #{OhlohScm::Version::SVN}, CVSNT #{OhlohScm::Version::CVSNT}, "\
22
+ "Mercurial #{OhlohScm::Version::HG} and Bazaar "\
23
+ "#{OhlohScm::Version::BZR}. If the installed version is different, "\
24
+ 'Ohloh SCM may not operate as expected.'
22
25
  end
data/spec/.rubocop.yml ADDED
@@ -0,0 +1,22 @@
1
+ inherit_from: ../.rubocop.yml
2
+
3
+ Style/FrozenStringLiteralComment:
4
+ Enabled: false
5
+
6
+ Metrics/LineLength:
7
+ Max: 120
8
+
9
+ Metrics/AbcSize:
10
+ Enabled: false
11
+
12
+ ClassLength:
13
+ Enabled: false
14
+
15
+ AbcSize:
16
+ Enabled: false
17
+
18
+ Metrics/MethodLength:
19
+ Enabled: false
20
+
21
+ Metrics/BlockLength:
22
+ Enabled: false
@@ -0,0 +1,39 @@
1
+ # NOTE: Setup before running benchmark. Replace hg with bzr in the following commands for bzr benchmarks.
2
+ # cd spec/scm_fixtures
3
+ # tar xf hg_large.tgz && cd hg_large
4
+ # bash create-large-file.sh 14 # Create a file as per given factor # 14=19MB # 15=38MB # 16=76MB # 17=151MB
5
+ # hg add && hg commit -m 'temp'
6
+ # cd ../../../
7
+ # ruby -I lib spec/benchmarks/hg_bzr_bash_vs_py_api.rb hg
8
+ # hg rollback # bzr uncommit # revert last commit to try different file sizes.
9
+
10
+ require_relative '../../lib/ohloh_scm'
11
+ require 'benchmark'
12
+
13
+ OhlohScm::System.logger.level = :error
14
+
15
+ scm = ARGV[0] || :hg
16
+ repo_path = File.expand_path("../scm_fixtures/#{scm}_large", __dir__)
17
+
18
+ puts 'Benchmarks for `cat_file`'
19
+
20
+ activity = OhlohScm::Factory.get_core(scm_type: scm, url: repo_path).activity
21
+ commit = OhlohScm::Commit.new(token: '1')
22
+ diff = OhlohScm::Diff.new(path: 'large.php')
23
+
24
+ puts `du -sh #{repo_path}/large.php`
25
+
26
+ Benchmark.bmbm 20 do |reporter|
27
+ reporter.report("#{scm}[bash api] ") do
28
+ if scm.to_s == 'hg'
29
+ `cd #{activity.url} && hg cat -r #{commit.token} #{diff.path}`
30
+ else
31
+ token = commit.token.to_i + 1
32
+ `cd #{activity.url} && bzr cat --name-from-revision -r #{token} '#{diff.path}'`
33
+ end
34
+ end
35
+
36
+ reporter.report("#{scm}[python api]") do
37
+ activity.cat_file(commit, diff)
38
+ end
39
+ end
@@ -0,0 +1,133 @@
1
+ # Usage: ruby process_spawn_benchmark.rb [-n <count>] [-m <mem-size>]
2
+ # Run posix-spawn (Ruby extension) benchmarks and report to standard output.
3
+ #
4
+ # Options:
5
+ # -n, --count=NUM total number of processes to spawn.
6
+ # -m, --mem-size=MB RES size to bloat to before performing benchmarks.
7
+ #
8
+ # Benchmarks run with -n 500 -m 100 by default.
9
+ require 'optparse'
10
+ require 'posix-spawn'
11
+ require 'benchmark'
12
+ require 'digest/sha1'
13
+ require 'open3'
14
+
15
+ class ProcessSpawnBenchmark
16
+ include Benchmark
17
+
18
+ def initialize(allocate, iterations)
19
+ bloat_main_process_memory(allocate)
20
+ repo_path = setup_test_repository
21
+ @cmd = "cd #{repo_path} && git log"
22
+ @iterations = iterations
23
+ benchmark_all
24
+ end
25
+
26
+ private
27
+
28
+ def bloat_main_process_memory(allocate)
29
+ _ = 'x' * allocate
30
+ memory_used = `ps aux | grep #{File.basename(__FILE__)} | grep -v grep | awk '{print $6/1000}'`.strip.to_i
31
+ puts "Parent process: #{memory_used}MB RESidual memory"
32
+ end
33
+
34
+ def setup_test_repository
35
+ repo_name = 'git'
36
+ repo_path = File.expand_path("../scm_fixtures/#{repo_name}.tgz", __dir__)
37
+ dest_path = "/tmp/#{repo_name}"
38
+ system("rm -rf #{dest_path} && tar xvf #{repo_path} -C /tmp/ > /dev/null")
39
+ dest_path
40
+ end
41
+
42
+ def benchmark_all
43
+ puts "Benchmarking: #{@iterations} child processes spawned for each"
44
+ bmbm 40 do |reporter|
45
+ @reporter = reporter
46
+ benchmark_open3
47
+ benchmark_posix_spawn_child
48
+ benchmark_posix_spawn
49
+ benchmark_popen
50
+ benchmark_system
51
+ benchmark_spawn if Process.respond_to?(:spawn)
52
+ benchmark_fork_exec
53
+ end
54
+ end
55
+
56
+ def benchmark_open3
57
+ @reporter.report('Open3.capture3 => ') do
58
+ @iterations.times do
59
+ stdout, = Open3.capture3(@cmd)
60
+ verify_output(stdout, __method__)
61
+ end
62
+ end
63
+ end
64
+
65
+ def benchmark_posix_spawn_child
66
+ @reporter.report('POSIX::Spawn::Child => ') do
67
+ @iterations.times do
68
+ child = POSIX::Spawn::Child.new(@cmd)
69
+ verify_output(child.out, __method__)
70
+ end
71
+ end
72
+ end
73
+
74
+ def benchmark_posix_spawn
75
+ @reporter.report('pspawn (posix_spawn) => ') do
76
+ @iterations.times do
77
+ pid = POSIX::Spawn.pspawn("#{@cmd} > /dev/null")
78
+ Process.wait(pid)
79
+ end
80
+ end
81
+ end
82
+
83
+ def benchmark_popen
84
+ @reporter.report('IO.popen:') do
85
+ @iterations.times do
86
+ IO.popen(@cmd).each {}
87
+ end
88
+ end
89
+ end
90
+
91
+ def benchmark_system
92
+ @reporter.report('``:') do
93
+ @iterations.times do
94
+ stdout = `#{@cmd}`
95
+ verify_output(stdout, __method__)
96
+ end
97
+ end
98
+ end
99
+
100
+ def benchmark_spawn
101
+ @reporter.report('spawn (native):') do
102
+ @iterations.times do
103
+ pid = Process.spawn("#{@cmd} > /dev/null")
104
+ Process.wait(pid)
105
+ end
106
+ end
107
+ end
108
+
109
+ def benchmark_fork_exec
110
+ @reporter.report('fspawn (fork/exec):') do
111
+ @iterations.times do
112
+ pid = POSIX::Spawn.fspawn("#{@cmd} > /dev/null")
113
+ Process.wait(pid)
114
+ end
115
+ end
116
+ end
117
+
118
+ def verify_output(stdout, method_name)
119
+ return if Digest::SHA1.hexdigest(stdout) == 'df31df68785baa8725e40e2a2583bb8f7e9dd3c5'
120
+
121
+ raise "Git log output did not match for #{method_name.slice(/benchmark_(.+)$/, 1)}"
122
+ end
123
+ end
124
+
125
+ allocate = 100 * (1024**2)
126
+ iterations = 500
127
+ ARGV.options do |o|
128
+ o.on('-n', '--count=num') { |val| iterations = val.to_i }
129
+ o.on('-m', '--mem-size=MB') { |val| allocate = val.to_i * (1024**2) }
130
+ o.parse!
131
+ end
132
+
133
+ ProcessSpawnBenchmark.new(allocate, iterations)
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AssertScmAttrHelper
4
+ def get_core(scm_type, opts = {})
5
+ OhlohScm::Factory.get_core({ scm_type: scm_type, url: 'foobar' }.merge(opts))
6
+ end
7
+
8
+ def assert_url_error(scm_type, *urls)
9
+ urls.each do |url|
10
+ core = get_core(scm_type, url: url)
11
+ core.validation.send(:url_errors).wont_be :empty?
12
+ end
13
+ end
14
+
15
+ def assert_url_valid(scm_type, url)
16
+ core = get_core(scm_type, url: url)
17
+ core.validation.send(:url_errors).must_be_nil
18
+ end
19
+
20
+ def assert_branch_name_error(scm_type, *branches)
21
+ branches.each do |branch_name|
22
+ core = get_core(scm_type, url: ':pserver:cvs:cvs@cvs.test.org:/test', branch_name: branch_name)
23
+ core.validation.send(:branch_name_errors).wont_be :empty?
24
+ end
25
+ end
26
+
27
+ def assert_branch_name_valid(scm_type, branch_name)
28
+ core = get_core(scm_type, url: ':pserver:cvs:cvs@cvs.test.org:/test', branch_name: branch_name)
29
+ core.validation.send(:branch_name_errors).must_be_nil
30
+ end
31
+ end
@@ -0,0 +1,26 @@
1
+ class CommitTokensHelper
2
+ def initialize(core, commit_labels, trunk_only: false)
3
+ @core = core
4
+ @trunk_only = trunk_only
5
+ @commit_labels = commit_labels
6
+ end
7
+
8
+ def between(from, to)
9
+ to_labels(@core.activity.commit_tokens(after: from_label(from), up_to: from_label(to),
10
+ trunk_only: @trunk_only))
11
+ end
12
+
13
+ private
14
+
15
+ def to_label(sha1)
16
+ @commit_labels.invert[sha1.to_s]
17
+ end
18
+
19
+ def to_labels(sha1s)
20
+ sha1s.map { |sha1| to_label(sha1) }
21
+ end
22
+
23
+ def from_label(label)
24
+ @commit_labels[label]
25
+ end
26
+ end
@@ -0,0 +1,5 @@
1
+ module GenericHelper
2
+ def tmpdir(prefix = 'oh_scm_repo_')
3
+ Dir.mktmpdir(prefix) { |path| yield path }
4
+ end
5
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RepositoryHelper
4
+ %w[git svn git_svn cvs hg bzr].each do |scm_type|
5
+ define_method("with_#{scm_type}_repository") do |name, branch_name = nil, &block|
6
+ with_repository(scm_type, name, branch_name) { |core| block.call(core) }
7
+ end
8
+ end
9
+
10
+ private
11
+
12
+ def with_repository(scm_type, name, branch_name = nil)
13
+ source_path = get_fixture_folder_path(name)
14
+ Dir.mktmpdir('oh_scm_fixture_') do |dir_path|
15
+ setup_repository_archive(source_path, dir_path)
16
+ path_prefix = scm_type == 'svn' ? 'file://' : ''
17
+ yield OhlohScm::Factory.get_core(scm_type: scm_type, url: "#{path_prefix}#{File.join(dir_path, name)}",
18
+ branch_name: branch_name)
19
+ end
20
+ end
21
+
22
+ def setup_repository_archive(source_path, dir_path)
23
+ if Dir.exist?(source_path)
24
+ `cp -R #{source_path} #{dir_path}`
25
+ elsif File.exist?("#{source_path}.tgz")
26
+ `tar xzf #{source_path}.tgz --directory #{dir_path}`
27
+ else
28
+ raise "Repository archive #{source_path} not found."
29
+ end
30
+ end
31
+
32
+ def get_fixture_folder_path(name)
33
+ fixture_dir = File.expand_path('../scm_fixtures', __dir__)
34
+ File.join(fixture_dir, name)
35
+ end
36
+ end
@@ -0,0 +1,25 @@
1
+ # We intend to keep System functions protected.
2
+ class SystemPrivateAccessor
3
+ extend OhlohScm::System
4
+
5
+ class << self
6
+ def run_private(cmd)
7
+ run(cmd)
8
+ end
9
+
10
+ def run_with_error_private(cmd)
11
+ run_with_err(cmd)
12
+ end
13
+ end
14
+ end
15
+
16
+ module SystemHelper
17
+ # Cannot use the name `run` since it conflicts with Minitest#run.
18
+ def run_p(cmd)
19
+ SystemPrivateAccessor.run_private(cmd)
20
+ end
21
+
22
+ def run_with_error_p(cmd)
23
+ SystemPrivateAccessor.run_with_error_private(cmd)
24
+ end
25
+ end
@@ -0,0 +1,460 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe 'Bzr::Activity' do
6
+ it 'must export contents of a repository' do
7
+ with_bzr_repository('bzr') do |bzr|
8
+ tmpdir do |dir|
9
+ bzr.activity.export(dir)
10
+ entries = ['.', '..', 'Cédric.txt', 'file1.txt', 'file3.txt', 'file4.txt', 'file5.txt']
11
+ Dir.entries(dir).sort.must_equal entries
12
+ end
13
+ end
14
+ end
15
+
16
+ it 'must return head and parents correctly' do
17
+ with_bzr_repository('bzr') do |bzr|
18
+ activity = bzr.activity
19
+
20
+ activity.head_token.must_equal 'test@example.com-20111222183733-y91if5npo3pe8ifs'
21
+ activity.head.token.must_equal 'test@example.com-20111222183733-y91if5npo3pe8ifs'
22
+ assert activity.head.diffs.any? # diffs should be populated
23
+
24
+ activity.parents(activity.head).first.token.must_equal 'obnox@samba.org-20090204004942-73rnw0izen42f154'
25
+ assert activity.parents(activity.head).first.diffs.any?
26
+ end
27
+ end
28
+
29
+ it 'must return file contents' do
30
+ with_bzr_repository('bzr') do |bzr|
31
+ expected = <<-EXPECTED.gsub(/ {8}/, '')
32
+ first file
33
+ second line
34
+ EXPECTED
35
+
36
+ commit = OhlohScm::Commit.new(token: 6)
37
+ diff = OhlohScm::Diff.new(path: 'file1.txt')
38
+ bzr.activity.cat_file(commit, diff).must_equal expected
39
+
40
+ # file2.txt has been removed in commit #5
41
+ diff2 = OhlohScm::Diff.new(path: 'file2.txt')
42
+ bzr.activity.cat_file(bzr.activity.commits.last, diff2).must_be_nil
43
+ end
44
+ end
45
+
46
+ it 'cat_file must work with non-ascii name' do
47
+ with_bzr_repository('bzr') do |bzr|
48
+ expected = <<-EXPECTED.gsub(/ {8}/, '')
49
+ first file
50
+ second line
51
+ EXPECTED
52
+
53
+ commit = OhlohScm::Commit.new(token: 7)
54
+ diff = OhlohScm::Diff.new(path: 'Cédric.txt')
55
+ bzr.activity.cat_file(commit, diff).must_equal expected
56
+ end
57
+ end
58
+
59
+ it 'must get file contents by parent rev' do
60
+ with_bzr_repository('bzr') do |bzr|
61
+ expected = <<-EXPECTED.gsub(/ {8}/, '')
62
+ first file
63
+ second line
64
+ EXPECTED
65
+
66
+ commit = OhlohScm::Commit.new(token: 6)
67
+ diff = OhlohScm::Diff.new(path: 'file1.txt')
68
+ bzr.activity.cat_file_parent(commit, diff).must_equal expected
69
+
70
+ # file2.txt has been removed in commit #5
71
+ expected = <<-EXPECTED.gsub(/ {8}/, '')
72
+ another file
73
+ EXPECTED
74
+
75
+ commit2 = OhlohScm::Commit.new(token: 5)
76
+ diff2 = OhlohScm::Diff.new(path: 'file2.txt')
77
+ bzr.activity.cat_file_parent(commit2, diff2).must_equal expected
78
+ end
79
+ end
80
+
81
+ describe 'commits' do
82
+ it 'must test_commit_count' do
83
+ with_bzr_repository('bzr') do |bzr|
84
+ bzr.activity.commit_count.must_equal 7
85
+ bzr.activity.commit_count(after: revision_ids.first).must_equal 6
86
+ bzr.activity.commit_count(after: revision_ids[5]).must_equal 1
87
+ bzr.activity.commit_count(after: revision_ids.last).must_equal 0
88
+ end
89
+ end
90
+
91
+ it 'must test_commit_count_with_branches' do
92
+ with_bzr_repository('bzr_with_branch') do |bzr|
93
+ # Only 3 commits are on main line... make sure we catch the branch commit as well
94
+ bzr.activity.commit_count.must_equal 4
95
+ end
96
+ end
97
+
98
+ it 'must test_commit_count_after_merge' do
99
+ with_bzr_repository('bzr_with_branch') do |bzr|
100
+ last_commit = bzr.activity.commits.last
101
+ assert_equal 0, bzr.activity.commit_count(after: last_commit.token)
102
+ end
103
+ end
104
+
105
+ it 'must test_commit_count_trunk_only' do
106
+ with_bzr_repository('bzr_with_branch') do |bzr|
107
+ # Only 3 commits are on main line
108
+ bzr.activity.commit_count(trunk_only: true).must_equal 3
109
+ end
110
+ end
111
+
112
+ it 'must test_commit_tokens_after' do
113
+ with_bzr_repository('bzr') do |bzr|
114
+ bzr.activity.commit_tokens.must_equal revision_ids
115
+ bzr.activity.commit_tokens(after: revision_ids.first).must_equal revision_ids[1..6]
116
+ bzr.activity.commit_tokens(after: revision_ids[5]).must_equal revision_ids[6..6]
117
+ bzr.activity.commit_tokens(after: revision_ids.last).must_equal []
118
+ end
119
+ end
120
+
121
+ it 'must test_commit_tokens_after_merge' do
122
+ with_bzr_repository('bzr_with_branch') do |bzr|
123
+ last_commit = bzr.activity.commits.last
124
+ assert_equal [], bzr.activity.commit_tokens(after: last_commit.token)
125
+ end
126
+ end
127
+
128
+ it 'must test_commit_tokens_after_nested_merge' do
129
+ with_bzr_repository('bzr_with_nested_branches') do |bzr|
130
+ last_commit = bzr.activity.commits.last
131
+ assert_equal [], bzr.activity.commit_tokens(after: last_commit.token)
132
+ end
133
+ end
134
+
135
+ it 'must test_commit_tokens_trunk_only_false' do
136
+ # Funny business with commit ordering has been fixed by BzrXmlParser.
137
+ # Now we always see branch commits before merge commit.
138
+ with_bzr_repository('bzr_with_branch') do |bzr|
139
+ expected = ['test@example.com-20090206214301-s93cethy9atcqu9h',
140
+ 'test@example.com-20090206214451-lzjngefdyw3vmgms',
141
+ 'test@example.com-20090206214350-rqhdpz92l11eoq2t', # branch commit
142
+ 'test@example.com-20090206214515-21lkfj3dbocao5pr'] # merge commit
143
+ bzr.activity.commit_tokens.must_equal expected
144
+ end
145
+ end
146
+
147
+ it 'must test_commit_tokens_trunk_only_true' do
148
+ with_bzr_repository('bzr_with_branch') do |bzr|
149
+ expected = ['test@example.com-20090206214301-s93cethy9atcqu9h',
150
+ 'test@example.com-20090206214451-lzjngefdyw3vmgms',
151
+ 'test@example.com-20090206214515-21lkfj3dbocao5pr'] # merge commit
152
+ bzr.activity.commit_tokens(trunk_only: true).must_equal expected
153
+ end
154
+ end
155
+
156
+ it 'must test_nested_branches_commit_tokens_trunk_only_false' do
157
+ with_bzr_repository('bzr_with_nested_branches') do |bzr|
158
+ expected = ['obnox@samba.org-20090204002342-5r0q4gejk69rk6uv',
159
+ 'obnox@samba.org-20090204002422-5ylnq8l4713eqfy0',
160
+ 'obnox@samba.org-20090204002453-u70a3ehf3ae9kay1',
161
+ 'obnox@samba.org-20090204002518-yb0x153oa6mhoodu',
162
+ 'obnox@samba.org-20090204002540-gmana8tk5f9gboq9',
163
+ 'obnox@samba.org-20090204004942-73rnw0izen42f154',
164
+ 'test@example.com-20110803170302-fz4mbr89n8f5agha',
165
+ 'test@example.com-20110803170341-v1icvy05b430t68l',
166
+ 'test@example.com-20110803170504-z7xz5uxj02e5x3z6',
167
+ 'test@example.com-20110803170522-asv6i9z6m22jc8zz',
168
+ 'test@example.com-20110803170648-o0xcbni7lwp97azj',
169
+ 'test@example.com-20110803170818-v44umypquqg8migo']
170
+ bzr.activity.commit_tokens.must_equal expected
171
+ end
172
+ end
173
+
174
+ it 'must test_nested_branches_commit_tokens_trunk_only_true' do
175
+ with_bzr_repository('bzr_with_nested_branches') do |bzr|
176
+ expected = ['obnox@samba.org-20090204002342-5r0q4gejk69rk6uv',
177
+ 'obnox@samba.org-20090204002422-5ylnq8l4713eqfy0',
178
+ 'obnox@samba.org-20090204002453-u70a3ehf3ae9kay1',
179
+ 'obnox@samba.org-20090204002518-yb0x153oa6mhoodu',
180
+ 'obnox@samba.org-20090204002540-gmana8tk5f9gboq9',
181
+ 'obnox@samba.org-20090204004942-73rnw0izen42f154',
182
+ 'test@example.com-20110803170818-v44umypquqg8migo']
183
+ bzr.activity.commit_tokens(trunk_only: true).must_equal expected
184
+ end
185
+ end
186
+
187
+ it 'must test_commits_trunk_only_false' do
188
+ with_bzr_repository('bzr_with_branch') do |bzr|
189
+ expected = ['test@example.com-20090206214301-s93cethy9atcqu9h',
190
+ 'test@example.com-20090206214451-lzjngefdyw3vmgms',
191
+ 'test@example.com-20090206214350-rqhdpz92l11eoq2t', # branch commit
192
+ 'test@example.com-20090206214515-21lkfj3dbocao5pr'] # merge commit
193
+
194
+ bzr.activity.commits.map(&:token).must_equal expected
195
+ end
196
+ end
197
+
198
+ it 'must test_commits_trunk_only_true' do
199
+ with_bzr_repository('bzr_with_branch') do |bzr|
200
+ expected = ['test@example.com-20090206214301-s93cethy9atcqu9h',
201
+ 'test@example.com-20090206214451-lzjngefdyw3vmgms',
202
+ 'test@example.com-20090206214515-21lkfj3dbocao5pr'] # merge commit
203
+ bzr.activity.commits(trunk_only: true).map(&:token).must_equal expected
204
+ end
205
+ end
206
+
207
+ it 'must test_commits_after_merge' do
208
+ with_bzr_repository('bzr_with_branch') do |bzr|
209
+ last_commit = bzr.activity.commits.last
210
+ bzr.activity.commits(after: last_commit.token).must_be :empty?
211
+ end
212
+ end
213
+
214
+ it 'must test_commits_after_nested_merge' do
215
+ with_bzr_repository('bzr_with_nested_branches') do |bzr|
216
+ last_commit = bzr.activity.commits.last
217
+ bzr.activity.commits(after: last_commit.token).must_be :empty?
218
+ end
219
+ end
220
+
221
+ it 'must test_nested_branches_commits_trunk_only_false' do
222
+ with_bzr_repository('bzr_with_nested_branches') do |bzr|
223
+ expected = ['obnox@samba.org-20090204002342-5r0q4gejk69rk6uv',
224
+ 'obnox@samba.org-20090204002422-5ylnq8l4713eqfy0',
225
+ 'obnox@samba.org-20090204002453-u70a3ehf3ae9kay1',
226
+ 'obnox@samba.org-20090204002518-yb0x153oa6mhoodu',
227
+ 'obnox@samba.org-20090204002540-gmana8tk5f9gboq9',
228
+ 'obnox@samba.org-20090204004942-73rnw0izen42f154',
229
+ 'test@example.com-20110803170302-fz4mbr89n8f5agha',
230
+ 'test@example.com-20110803170341-v1icvy05b430t68l',
231
+ 'test@example.com-20110803170504-z7xz5uxj02e5x3z6',
232
+ 'test@example.com-20110803170522-asv6i9z6m22jc8zz',
233
+ 'test@example.com-20110803170648-o0xcbni7lwp97azj',
234
+ 'test@example.com-20110803170818-v44umypquqg8migo']
235
+ bzr.activity.commits.map(&:token).must_equal expected
236
+ end
237
+ end
238
+
239
+ it 'must test_nested_branches_commits_trunk_only_true' do
240
+ with_bzr_repository('bzr_with_nested_branches') do |bzr|
241
+ expected = ['obnox@samba.org-20090204002342-5r0q4gejk69rk6uv',
242
+ 'obnox@samba.org-20090204002422-5ylnq8l4713eqfy0',
243
+ 'obnox@samba.org-20090204002453-u70a3ehf3ae9kay1',
244
+ 'obnox@samba.org-20090204002518-yb0x153oa6mhoodu',
245
+ 'obnox@samba.org-20090204002540-gmana8tk5f9gboq9',
246
+ 'obnox@samba.org-20090204004942-73rnw0izen42f154',
247
+ 'test@example.com-20110803170818-v44umypquqg8migo']
248
+ bzr.activity.commits(trunk_only: true).map(&:token).must_equal expected
249
+ end
250
+ end
251
+
252
+ it 'must test_commits' do
253
+ with_bzr_repository('bzr') do |bzr|
254
+ bzr.activity.commits.collect(&:token).must_equal revision_ids
255
+ bzr.activity.commits(after: revision_ids[5]).collect(&:token).must_equal revision_ids[6..6]
256
+ bzr.activity.commits(after: revision_ids.last).collect(&:token).must_equal []
257
+
258
+ # Check that the diffs are not populated
259
+ bzr.activity.commits.first.diffs.must_equal []
260
+ end
261
+ end
262
+
263
+ it 'must test_each_commit' do
264
+ with_bzr_repository('bzr') do |bzr|
265
+ commits = []
266
+ bzr.activity.each_commit do |c|
267
+ assert c.committer_name
268
+ assert c.committer_date.is_a?(Time)
269
+ refute c.message.empty?
270
+ assert c.diffs.any?
271
+ # Check that the diffs are populated
272
+ c.diffs.each do |d|
273
+ assert d.action =~ /^[MAD]$/
274
+ refute d.path.empty?
275
+ end
276
+ commits << c
277
+ end
278
+
279
+ # Make sure we cleaned up after ourselves
280
+ assert !FileTest.exist?(bzr.activity.log_filename)
281
+
282
+ # Verify that we got the commits in forward chronological order
283
+ commits.collect(&:token).must_equal revision_ids
284
+ end
285
+ end
286
+
287
+ it 'must test_each_commit_trunk_only_false' do
288
+ with_bzr_repository('bzr_with_branch') do |bzr|
289
+ commits = []
290
+ bzr.activity.each_commit { |c| commits << c }
291
+ expected = ['test@example.com-20090206214301-s93cethy9atcqu9h',
292
+ 'test@example.com-20090206214451-lzjngefdyw3vmgms',
293
+ 'test@example.com-20090206214350-rqhdpz92l11eoq2t', # branch commit
294
+ 'test@example.com-20090206214515-21lkfj3dbocao5pr'] # merge commit]
295
+ commits.map(&:token).must_equal expected
296
+ end
297
+ end
298
+
299
+ it 'must test_each_commit_trunk_only_true' do
300
+ with_bzr_repository('bzr_with_branch') do |bzr|
301
+ commits = []
302
+ bzr.activity.each_commit(trunk_only: true) { |c| commits << c }
303
+ expected = [
304
+ 'test@example.com-20090206214301-s93cethy9atcqu9h',
305
+ 'test@example.com-20090206214451-lzjngefdyw3vmgms',
306
+ 'test@example.com-20090206214515-21lkfj3dbocao5pr' # merge commit
307
+ # 'test@example.com-20090206214350-rqhdpz92l11eoq2t' # branch commit -- after merge!
308
+ ]
309
+ commits.map(&:token).must_equal expected
310
+ end
311
+ end
312
+
313
+ it 'must test_each_commit_after_merge' do
314
+ with_bzr_repository('bzr_with_branch') do |bzr|
315
+ last_commit = bzr.activity.commits.last
316
+
317
+ commits = []
318
+ bzr.activity.each_commit(after: last_commit.token) { |c| commits << c }
319
+ commits.must_equal []
320
+ end
321
+ end
322
+
323
+ it 'must test_each_commit_after_nested_merge_at_tip' do
324
+ with_bzr_repository('bzr_with_nested_branches') do |bzr|
325
+ last_commit = bzr.activity.commits.last
326
+
327
+ commits = []
328
+ bzr.activity.each_commit(after: last_commit.token) { |c| commits << c }
329
+ commits.must_equal []
330
+ end
331
+ end
332
+
333
+ it 'must test_each_commit_after_nested_merge_not_at_tip' do
334
+ with_bzr_repository('bzr_with_nested_branches') do |bzr|
335
+ last_commit = bzr.activity.commits.last
336
+ next_to_last_commit = bzr.activity.commits[-2]
337
+
338
+ yielded_commits = []
339
+ bzr.activity.each_commit(after: next_to_last_commit.token) { |c| yielded_commits << c }
340
+ yielded_commits.map(&:token).must_equal [last_commit.token]
341
+ end
342
+ end
343
+
344
+ it 'must test_nested_branches_each_commit_trunk_only_false' do
345
+ with_bzr_repository('bzr_with_nested_branches') do |bzr|
346
+ commits = []
347
+ bzr.activity.each_commit { |c| commits << c }
348
+ expected = ['obnox@samba.org-20090204002342-5r0q4gejk69rk6uv',
349
+ 'obnox@samba.org-20090204002422-5ylnq8l4713eqfy0',
350
+ 'obnox@samba.org-20090204002453-u70a3ehf3ae9kay1',
351
+ 'obnox@samba.org-20090204002518-yb0x153oa6mhoodu',
352
+ 'obnox@samba.org-20090204002540-gmana8tk5f9gboq9',
353
+ 'obnox@samba.org-20090204004942-73rnw0izen42f154',
354
+ 'test@example.com-20110803170302-fz4mbr89n8f5agha',
355
+ 'test@example.com-20110803170341-v1icvy05b430t68l',
356
+ 'test@example.com-20110803170504-z7xz5uxj02e5x3z6',
357
+ 'test@example.com-20110803170522-asv6i9z6m22jc8zz',
358
+ 'test@example.com-20110803170648-o0xcbni7lwp97azj',
359
+ 'test@example.com-20110803170818-v44umypquqg8migo']
360
+ commits.map(&:token).must_equal expected
361
+ end
362
+ end
363
+
364
+ it 'must test_nested_branches_each_commit_trunk_only_true' do
365
+ with_bzr_repository('bzr_with_nested_branches') do |bzr|
366
+ commits = []
367
+ bzr.activity.each_commit(trunk_only: true) { |c| commits << c }
368
+ expected = ['obnox@samba.org-20090204002342-5r0q4gejk69rk6uv',
369
+ 'obnox@samba.org-20090204002422-5ylnq8l4713eqfy0',
370
+ 'obnox@samba.org-20090204002453-u70a3ehf3ae9kay1',
371
+ 'obnox@samba.org-20090204002518-yb0x153oa6mhoodu',
372
+ 'obnox@samba.org-20090204002540-gmana8tk5f9gboq9',
373
+ 'obnox@samba.org-20090204004942-73rnw0izen42f154',
374
+ 'test@example.com-20110803170818-v44umypquqg8migo']
375
+ commits.map(&:token).must_equal expected
376
+ end
377
+ end
378
+
379
+ # This bzr repository contains the following tree structure
380
+ # /foo/
381
+ # /foo/helloworld.c
382
+ # /bar/
383
+ # Ohloh doesn't care about directories, so only /foo/helloworld.c should be reported.
384
+ it 'must test_each_commit_excludes_directories' do
385
+ with_bzr_repository('bzr_with_subdirectories') do |bzr|
386
+ commits = []
387
+ bzr.activity.each_commit do |c|
388
+ commits << c
389
+ end
390
+ commits.size.must_equal 1
391
+ commits.first.diffs.size.must_equal 1
392
+ commits.first.diffs.first.path.must_equal 'foo/helloworld.c'
393
+ end
394
+ end
395
+
396
+ # Verfies OTWO-344
397
+ it 'must test_commit_tokens_with_colon_character' do
398
+ with_bzr_repository('bzr_colon') do |bzr|
399
+ bzr.activity.commit_tokens.must_equal ['svn-v4:364a429a-ab12-11de-804f-e3d9c25ff3d2::0']
400
+ end
401
+ end
402
+
403
+ it 'must test_committer_and_author_name' do
404
+ with_bzr_repository('bzr_with_authors') do |bzr|
405
+ commits = []
406
+ bzr.activity.each_commit do |c|
407
+ commits << c
408
+ end
409
+ commits.size.must_equal 3
410
+
411
+ commits[0].message.must_equal 'Initial.'
412
+ commits[0].committer_name.must_equal 'Abhay Mujumdar'
413
+ commits[0].author_name.must_be_nil
414
+ commits[0].author_email.must_be_nil
415
+
416
+ commits[1].message.must_equal 'Updated.'
417
+ commits[1].committer_name.must_equal 'Abhay Mujumdar'
418
+ commits[1].author_name.must_equal 'John Doe'
419
+ commits[1].author_email.must_equal 'johndoe@example.com'
420
+
421
+ # When there are multiple authors, first one is captured.
422
+ commits[2].message.must_equal 'Updated by two authors.'
423
+ commits[2].committer_name.must_equal 'test'
424
+ commits[2].author_name.must_equal 'John Doe'
425
+ commits[2].author_email.must_equal 'johndoe@example.com'
426
+ end
427
+ end
428
+
429
+ # Bzr converts invalid utf-8 characters into valid format before commit.
430
+ # So no utf-8 encoding issues are seen in ruby when dealing with Bzr.
431
+ it 'must test_commits_encoding' do
432
+ with_bzr_repository('bzr_with_invalid_encoding') do |bzr|
433
+ assert bzr.activity.commits
434
+ end
435
+ end
436
+
437
+ protected
438
+
439
+ def revision_ids
440
+ ['obnox@samba.org-20090204002342-5r0q4gejk69rk6uv', # 1
441
+ 'obnox@samba.org-20090204002422-5ylnq8l4713eqfy0', # 2
442
+ 'obnox@samba.org-20090204002453-u70a3ehf3ae9kay1', # 3
443
+ 'obnox@samba.org-20090204002518-yb0x153oa6mhoodu', # 4
444
+ 'obnox@samba.org-20090204002540-gmana8tk5f9gboq9', # 5
445
+ 'obnox@samba.org-20090204004942-73rnw0izen42f154', # 6
446
+ 'test@example.com-20111222183733-y91if5npo3pe8ifs'] # 7
447
+ end
448
+ end
449
+
450
+ it 'must get the tags correctly' do
451
+ with_bzr_repository('bzr') do |bzr|
452
+ time1 = Time.parse('2009-02-04 00:25:40 +0000')
453
+ time2 = Time.parse('2011-12-22 18:37:33 +0000')
454
+ time3 = Time.parse('2009-02-04 00:24:22 +0000')
455
+
456
+ bzr.activity.tags.must_equal [['v1.0.0', '5', time1],
457
+ ['v2.0.0', '7', time2], ['v 3.0.0', '2', time3]]
458
+ end
459
+ end
460
+ end