1. python_mirrors
  2. hgsubversion

Commits

Patrick Mézard  committed d3ea6c9

Do not recurse for externals on copied directory in stupid mode

We inherit the source externals, changes to children will appear in the
changelog.

  • Participants
  • Parent commits 1c46ad3
  • Branches default

Comments (0)

Files changed (4)

File fetch_command.py

View file
                 continue
             path = path[len(branchprefix):]
             dirs.add(path)
-            if e.action == 'M':
+            if e.action == 'M' or (e.action == 'A' and e.copyfrom_path):
+                # Do not recurse in copied directories, changes are marked
+                # as 'M', except for the copied one.
                 continue
             for child, k in svn.list_files(branchprefix + path, r.revnum):
                 if k == 'd':

File tests/fixtures/externals.sh

View file
 svn copy ../trunk branch1
 svn propdel svn:externals branch1/subdir2
 svn ci -m 'externals in subtree'
+# Test branch with externals, removing on copy root
+svn copy ../trunk branch2
+svn propdel svn:externals branch2 branch2/subdir2
+svn ci -m 'externals in subtree, removed on root'
 cd ../trunk
 # Suppress the subdirectory
 svn rm --force subdir

File tests/fixtures/externals.svndump

View file
 SVN-fs-dump-format-version: 2
 
-UUID: b0dd1dbb-3e41-4ee0-8194-38c44cae026b
+UUID: ab7049d2-24fc-4035-b126-5f7012d66a0d
 
 Revision-number: 0
 Prop-content-length: 56
 K 8
 svn:date
 V 27
-2009-01-12T22:58:18.300869Z
+2009-01-12T23:19:30.150669Z
 PROPS-END
 
 Revision-number: 1
 K 8
 svn:date
 V 27
-2009-01-12T22:58:18.364893Z
+2009-01-12T23:19:30.267365Z
 PROPS-END
 
 Node-path: branches
 K 8
 svn:date
 V 27
-2009-01-12T22:58:19.228564Z
+2009-01-12T23:19:31.232927Z
 PROPS-END
 
 Node-path: externals/project1
 K 8
 svn:date
 V 27
-2009-01-12T22:58:20.213824Z
+2009-01-12T23:19:32.212750Z
 PROPS-END
 
 Node-path: trunk
 K 8
 svn:date
 V 27
-2009-01-12T22:58:21.179341Z
+2009-01-12T23:19:33.180250Z
 PROPS-END
 
 Node-path: trunk
 K 8
 svn:date
 V 27
-2009-01-12T22:58:22.266419Z
+2009-01-12T23:19:34.270854Z
 PROPS-END
 
 Node-path: trunk
 K 8
 svn:date
 V 27
-2009-01-12T22:58:25.185874Z
+2009-01-12T23:19:37.185743Z
 PROPS-END
 
 Node-path: branches/branch1
 
 
 Revision-number: 7
+Prop-content-length: 139
+Content-length: 139
+
+K 7
+svn:log
+V 37
+externals in subtree, removed on root
+K 10
+svn:author
+V 7
+pmezard
+K 8
+svn:date
+V 27
+2009-01-12T23:19:39.198328Z
+PROPS-END
+
+Node-path: branches/branch2
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 5
+Node-copyfrom-path: trunk
+Prop-content-length: 34
+Content-length: 34
+
+K 13
+svn:mergeinfo
+V 0
+
+PROPS-END
+
+
+Node-path: branches/branch2/subdir2
+Node-kind: dir
+Node-action: change
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Revision-number: 8
 Prop-content-length: 125
 Content-length: 125
 
 K 8
 svn:date
 V 27
-2009-01-12T22:58:26.188417Z
+2009-01-12T23:19:40.183807Z
 PROPS-END
 
 Node-path: trunk/subdir
 Node-action: delete
 
 
-Revision-number: 8
+Revision-number: 9
 Prop-content-length: 126
 Content-length: 126
 
 K 8
 svn:date
 V 27
-2009-01-12T22:58:27.183612Z
+2009-01-12T23:19:41.180477Z
 PROPS-END
 
 Node-path: trunk/subdir2

File tests/test_externals.py

View file
         self.assertEqual(ref3, repo[3]['.hgsvnexternals'].data())
 
         ref4 = """\
-[.]
- ^/externals/project2 deps/project2
-[subdir2]
+[subdir]
  ^/externals/project1 deps/project1
 """
         self.assertEqual(ref4, repo[4]['.hgsvnexternals'].data())
         ref5 = """\
 [.]
  ^/externals/project2 deps/project2
+[subdir2]
+ ^/externals/project1 deps/project1
 """
         self.assertEqual(ref5, repo[5]['.hgsvnexternals'].data())
 
+        ref6 = """\
+[.]
+ ^/externals/project2 deps/project2
+"""
+        self.assertEqual(ref6, repo[6]['.hgsvnexternals'].data())
+
     def test_externals_stupid(self):
         self.test_externals(True)