diff mercurial/subrepo.py @ 10699:7b0a0d498cc0

Merge with stable
author Martin Geisler <mg@lazybytes.net>
date Mon, 15 Mar 2010 18:36:11 +0100
parents 001ffc2b3d22 c90d923fff64
children 8d5f5122a732
line wrap: on
line diff
--- a/mercurial/subrepo.py	Sun Mar 14 23:18:50 2010 +0100
+++ b/mercurial/subrepo.py	Mon Mar 15 18:36:11 2010 +0100
@@ -193,8 +193,11 @@
                 fp.write('%s = %s\n' % (key, value))
                 self._repo.ui.setconfig('paths', key, value)
 
-            defpath = os.path.join(_abssource(ctx._repo), path)
+            defpath = _abssource(self._repo)
+            defpushpath = _abssource(self._repo, True)
             addpathconfig('default', defpath)
+            if defpath != defpushpath:
+                addpathconfig('default-push', defpushpath)
             fp.close()
 
     def dirty(self):