Mercurial > hg
diff tests/test-convert-svn-sink.t @ 41616:2c13e91ede6e
convert: handle empty intial commits while converting to svn
Svn commit generation code skips empty commits, returning the parent.
Skipping the root commit must return None instead.
Added test to check skipping of empty commits.
author | Nikita Slyusarev <nslus@yandex-team.com> |
---|---|
date | Thu, 07 Feb 2019 18:57:54 +0300 |
parents | 5abc47d4ca6b |
children | 36ee0d6d64c5 |
line wrap: on
line diff
--- a/tests/test-convert-svn-sink.t Mon Jan 21 17:37:33 2019 +0000 +++ b/tests/test-convert-svn-sink.t Thu Feb 07 18:57:54 2019 +0300 @@ -466,3 +466,46 @@ msg: Add file a A /a $ rm -rf a a-hg a-hg-wc + +Skipping empty commits + + $ hg init a + + $ hg --cwd a --config ui.allowemptycommit=True ci -d '1 0' -m 'Initial empty commit' + + $ echo a > a/a + $ hg --cwd a ci -d '0 0' -A -m 'Some change' + adding a + $ hg --cwd a --config ui.allowemptycommit=True ci -d '2 0' -m 'Empty commit 1' + $ hg --cwd a --config ui.allowemptycommit=True ci -d '3 0' -m 'Empty commit 2' + $ echo b > a/b + $ hg --cwd a ci -d '0 0' -A -m 'Another change' + adding b + + $ hg convert -d svn a + assuming destination a-hg + initializing svn repository 'a-hg' + initializing svn working copy 'a-hg-wc' + scanning source... + sorting... + converting... + 4 Initial empty commit + 3 Some change + 2 Empty commit 1 + 1 Empty commit 2 + 0 Another change + + $ svnupanddisplay a-hg-wc 0 + 2 1 test a + 2 2 test . + 2 2 test b + revision: 2 + author: test + msg: Another change + A /b + revision: 1 + author: test + msg: Some change + A /a + + $ rm -rf a a-hg a-hg-wc