Merge with crew-stable
authorPatrick Mezard <pmezard@gmail.com>
Mon, 21 Jan 2008 14:15:38 +0100
changeset 5913 7c2921a60035
parent 5912 d67cfe0d4714 (current diff)
parent 5883 a893610f6f0c (diff)
child 5914 8e7796a990c5
Merge with crew-stable
hgext/convert/subversion.py
mercurial/localrepo.py
mercurial/util.py
tests/test-convert-svn-branches.out
tests/test-convert-svn-source
tests/test-convert-svn-source.out
--- a/hgext/convert/subversion.py	Sun Jan 20 08:12:07 2008 -0200
+++ b/hgext/convert/subversion.py	Mon Jan 21 14:15:38 2008 +0100
@@ -598,7 +598,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, to_revnum):
         if from_revnum < to_revnum:
--- a/mercurial/localrepo.py	Sun Jan 20 08:12:07 2008 -0200
+++ b/mercurial/localrepo.py	Mon Jan 21 14:15:38 2008 +0100
@@ -687,6 +687,8 @@
                p1=None, p2=None, extra={}, empty_ok=False):
         wlock = lock = tr = None
         valid = 0 # don't save the dirstate if this isn't set
+        if files:
+            files = util.unique(files)
         try:
             commit = []
             remove = []
--- a/tests/test-convert-svn-branches.out	Sun Jan 20 08:12:07 2008 -0200
+++ b/tests/test-convert-svn-branches.out	Mon Jan 21 14:15:38 2008 +0100
@@ -89,7 +89,7 @@
 | | |
 | o |  3 change letter files: letter.txt
 | | |
-+---o  2 branch trunk, remove letter3 files: letter.txt letter.txt letter2.txt letter2.txt
++---o  2 branch trunk, remove letter3 files: letter.txt letter2.txt
 | |
 | o  1 hello files: letter.txt letter2.txt letter3.txt
 |/
--- a/tests/test-convert-svn-source	Sun Jan 20 08:12:07 2008 -0200
+++ b/tests/test-convert-svn-source	Mon Jan 21 14:15:38 2008 +0100
@@ -103,13 +103,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-source.out	Sun Jan 20 08:12:07 2008 -0200
+++ b/tests/test-convert-svn-source.out	Mon Jan 21 14:15:38 2008 +0100
@@ -82,14 +82,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
@@ -101,9 +103,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
 |