push: specify default-push and default as fallback paths
authorYuya Nishihara <yuya@tcha.org>
Sat, 26 Dec 2015 16:12:28 +0900
changeset 27562 cb0cfa9fd340
parent 27561 723413ee000e
child 27563 56c2caffde3d
push: specify default-push and default as fallback paths The next patch will remove the "default-push" hack from ui.paths so that ui.paths["default"].pushurl can be different from "default-push".
mercurial/commands.py
--- a/mercurial/commands.py	Sat Dec 26 16:10:39 2015 +0900
+++ b/mercurial/commands.py	Sat Dec 26 16:12:28 2015 +0900
@@ -5663,7 +5663,7 @@
                 # 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', 'default'))
     if not path:
         raise error.Abort(_('default repository not configured!'),
                          hint=_('see the "path" section in "hg help config"'))