diff hgsubversion/stupid.py @ 762:c31a1f92e1c6

svnexternals: preliminary support for subrepos based externals At this point, only pulling externals definitions into .hgsub and .hgsubstate is supported. One difference between subrepos and svn:externals is the former separate the source definition and target revision in two files, while svn:externals definitions contain both. To handle this, the svn:externals revision references is replaced with a {REV} placeholder and stored in .hgsub, prefixed with the external base directory separated with a ':', while the revision is extracted in .hgsubstate. For instance, the following external: -r3 ^/externals/proj2@2 deps/proj2 Becomes: (.hgsub) deps/proj2 = [hgsubversion] :-r{REV} ^/externals/proj2@2 deps/proj2 (.hgsubstate) 3 deps/proj2
author Patrick Mezard <pmezard@gmail.com>
date Thu, 25 Nov 2010 21:55:21 +0100
parents 76ebfc41f490
children cc1d4aa3ba41
line wrap: on
line diff
--- a/hgsubversion/stupid.py
+++ b/hgsubversion/stupid.py
@@ -343,13 +343,13 @@ def getcopies(svn, meta, branch, branchp
             hgcopies.update({k: v})
     return hgcopies
 
-def fetch_externals(svn, branchpath, r, parentctx):
+def fetch_externals(ui, svn, branchpath, r, parentctx):
     """Extract svn:externals for the current revision and branch
 
     Return an externalsfile instance or None if there are no externals
     to convert and never were.
     """
-    externals = svnexternals.parse(parentctx)
+    externals = svnexternals.parse(ui, parentctx)
     # Detect property additions only, changes are handled by checking
     # existing entries individually. Projects are unlikely to store
     # externals on many different root directories, so we trade code
@@ -600,7 +600,7 @@ def convert_rev(ui, meta, svn, r, tbdelt
 
         externals = {}
         if meta.layout != 'single':
-            externals = fetch_externals(svn, branches[b], r, parentctx)
+            externals = fetch_externals(ui, svn, branches[b], r, parentctx)
             externals = svnexternals.getchanges(ui, meta.repo, parentctx,
                                                 externals)
             files_touched.extend(externals)