Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 27562:cb0cfa9fd340
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".
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 26 Dec 2015 16:12:28 +0900 |
parents | 9dcd55a63f0b |
children | 34b01a51bd42 |
comparison
equal
deleted
inserted
replaced
27561:723413ee000e | 27562:cb0cfa9fd340 |
---|---|
5661 else: | 5661 else: |
5662 # if we try to push a deleted bookmark, translate it to null | 5662 # if we try to push a deleted bookmark, translate it to null |
5663 # this lets simultaneous -r, -b options continue working | 5663 # this lets simultaneous -r, -b options continue working |
5664 opts.setdefault('rev', []).append("null") | 5664 opts.setdefault('rev', []).append("null") |
5665 | 5665 |
5666 path = ui.paths.getpath(dest, default='default') | 5666 path = ui.paths.getpath(dest, default=('default-push', 'default')) |
5667 if not path: | 5667 if not path: |
5668 raise error.Abort(_('default repository not configured!'), | 5668 raise error.Abort(_('default repository not configured!'), |
5669 hint=_('see the "path" section in "hg help config"')) | 5669 hint=_('see the "path" section in "hg help config"')) |
5670 dest = path.pushloc or path.loc | 5670 dest = path.pushloc or path.loc |
5671 branches = (path.branch, opts.get('branch') or []) | 5671 branches = (path.branch, opts.get('branch') or []) |