Mercurial > hg
changeset 5883:a893610f6f0c
convert: enforce svn_source.getchanges() files unicity
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 21 Jan 2008 10:04:35 +0100 |
parents | f791a2acf11b |
children | 7c2921a60035 b6deda0f69fa |
files | hgext/convert/subversion.py tests/test-convert-svn tests/test-convert-svn.out |
diffstat | 3 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Mon Jan 21 10:02:32 2008 +0100 +++ b/hgext/convert/subversion.py Mon Jan 21 10:04:35 2008 +0100 @@ -544,7 +544,7 @@ copies[self.recode(copyto_entry)] = self.recode(entry) # copy from quux splort/quuxfile - return (entries, copies) + return (util.unique(entries), copies) def _fetch_revisions(self, from_revnum = 0, to_revnum = 347): self.child_cset = None
--- a/tests/test-convert-svn Mon Jan 21 10:02:32 2008 +0100 +++ b/tests/test-convert-svn Mon Jan 21 10:04:35 2008 +0100 @@ -96,13 +96,16 @@ echo % update svn repository again cd A echo "see second letter" >> letter.txt -echo "nice to meet you" > letter2.txt -svn add letter2.txt +# Put it in a subdirectory to test duplicate file records +# from svn source (issue 714) +mkdir todo +echo "nice to meet you" > todo/letter2.txt +svn add todo svn ci -m "second letter" svn copy -m "tag v0.2" $svnurl/trunk $svnurl/tags/v0.2 -echo "blah-blah-blah" >> letter2.txt +echo "blah-blah-blah" >> todo/letter2.txt svn ci -m "work in progress" cd ..
--- a/tests/test-convert-svn.out Mon Jan 21 10:02:32 2008 +0100 +++ b/tests/test-convert-svn.out Mon Jan 21 10:04:35 2008 +0100 @@ -75,14 +75,16 @@ 0 nice day updating tags % update svn repository again -A letter2.txt +A todo +A todo/letter2.txt Sending letter.txt -Adding letter2.txt +Adding todo +Adding todo/letter2.txt Transmitting file data .. Committed revision 9. Committed revision 10. -Sending letter2.txt +Sending todo/letter2.txt Transmitting file data . Committed revision 11. % test incremental conversion @@ -95,9 +97,9 @@ updating tags o 7 update tags files: .hgtags | -o 6 work in progress files: letter2.txt +o 6 work in progress files: todo/letter2.txt | -o 5 second letter files: letter.txt letter2.txt +o 5 second letter files: letter.txt todo/letter2.txt | o 4 update tags files: .hgtags |