Show More
@@ -5274,18 +5274,14 b' def push(ui, repo, dest=None, **opts):' | |||
|
5274 | 5274 | # this lets simultaneous -r, -b options continue working |
|
5275 | 5275 | opts.setdefault('rev', []).append("null") |
|
5276 | 5276 | |
|
5277 |
|
|
|
5278 | dest, branches = hg.parseurl(dest, opts.get('branch')) | |
|
5277 | path = ui.paths.getpath(dest or 'default-push', default='default') | |
|
5278 | if not path: | |
|
5279 | raise util.Abort(_('default repository not configured!'), | |
|
5280 | hint=_('see the "path" section in "hg help config"')) | |
|
5281 | dest, branches = path.loc, (path.branch, opts.get('branch') or []) | |
|
5279 | 5282 | ui.status(_('pushing to %s\n') % util.hidepassword(dest)) |
|
5280 | 5283 | revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev')) |
|
5281 | try: | |
|
5282 | other = hg.peer(repo, opts, dest) | |
|
5283 | except error.RepoError: | |
|
5284 | if dest == "default-push": | |
|
5285 | raise util.Abort(_("default repository not configured!"), | |
|
5286 | hint=_('see the "path" section in "hg help config"')) | |
|
5287 | else: | |
|
5288 | raise | |
|
5284 | other = hg.peer(repo, opts, dest) | |
|
5289 | 5285 | |
|
5290 | 5286 | if revs: |
|
5291 | 5287 | revs = [repo.lookup(r) for r in scmutil.revrange(repo, revs)] |
General Comments 0
You need to be logged in to leave comments.
Login now