mercurial/commands.py
branchstable
changeset 27555 ca8ada499529
parent 27320 59d5f619e69e
child 27570 44f717c87903
--- a/mercurial/commands.py	Wed Dec 16 10:39:00 2015 -0800
+++ b/mercurial/commands.py	Sat Dec 26 15:18:16 2015 +0900
@@ -5394,11 +5394,13 @@
                 # this lets simultaneous -r, -b options continue working
                 opts.setdefault('rev', []).append("null")
 
-    path = ui.paths.getpath(dest, default='default')
+    path = ui.paths.getpath(dest, default='default-push')
+    if not path:
+        path = ui.paths.getpath(dest, default='default')
     if not path:
         raise error.Abort(_('default repository not configured!'),
                          hint=_('see the "path" section in "hg help config"'))
-    dest, branches = path.pushloc, (path.branch, opts.get('branch') or [])
+    dest, branches = path.loc, (path.branch, opts.get('branch') or [])
     ui.status(_('pushing to %s\n') % util.hidepassword(dest))
     revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev'))
     other = hg.peer(repo, opts, dest)