Commits

Anonymous committed 5395492

Fix: clone raised an error when hg.clone had not been called by an extension which wrapped the clone command.

Comments (0)

Files changed (1)

hgsubversion/wrappers.py

     dstrepo = data.get('dstrepo')
     srcrepo = data.get('srcrepo')
 
-    if dstrepo.local() and srcrepo.capable('subversion'):
+    # if cloned by hgsubversion to the dstrepo, store the data
+    if dstrepo and dstrepo.local() and srcrepo.capable('subversion'):
         fd = dstrepo.opener("hgrc", "a", text=True)
         for section in set(s for s, v in optionmap.itervalues()):
             config = dict(ui.configitems(section))