Show More
@@ -5394,11 +5394,13 b' def push(ui, repo, dest=None, **opts):' | |||||
5394 | # this lets simultaneous -r, -b options continue working |
|
5394 | # this lets simultaneous -r, -b options continue working | |
5395 | opts.setdefault('rev', []).append("null") |
|
5395 | opts.setdefault('rev', []).append("null") | |
5396 |
|
5396 | |||
|
5397 | path = ui.paths.getpath(dest, default='default-push') | |||
|
5398 | if not path: | |||
5397 | path = ui.paths.getpath(dest, default='default') |
|
5399 | path = ui.paths.getpath(dest, default='default') | |
5398 | if not path: |
|
5400 | if not path: | |
5399 | raise error.Abort(_('default repository not configured!'), |
|
5401 | raise error.Abort(_('default repository not configured!'), | |
5400 | hint=_('see the "path" section in "hg help config"')) |
|
5402 | hint=_('see the "path" section in "hg help config"')) | |
5401 |
dest, branches = path. |
|
5403 | dest, branches = path.loc, (path.branch, opts.get('branch') or []) | |
5402 | ui.status(_('pushing to %s\n') % util.hidepassword(dest)) |
|
5404 | ui.status(_('pushing to %s\n') % util.hidepassword(dest)) | |
5403 | revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev')) |
|
5405 | revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev')) | |
5404 | other = hg.peer(repo, opts, dest) |
|
5406 | other = hg.peer(repo, opts, dest) |
@@ -46,6 +46,14 b" Push should push to 'default-push' when " | |||||
46 | adding file changes |
|
46 | adding file changes | |
47 | added 1 changesets with 1 changes to 1 files |
|
47 | added 1 changesets with 1 changes to 1 files | |
48 |
|
48 | |||
|
49 | But push should push to 'default' if explicitly specified (issue5000): | |||
|
50 | ||||
|
51 | $ hg --cwd b push default | |||
|
52 | pushing to $TESTTMP/a (glob) | |||
|
53 | searching for changes | |||
|
54 | no changes found | |||
|
55 | [1] | |||
|
56 | ||||
49 | Push should push to 'default-push' when 'default' is not set |
|
57 | Push should push to 'default-push' when 'default' is not set | |
50 |
|
58 | |||
51 | $ hg -q clone a push-default-only |
|
59 | $ hg -q clone a push-default-only |
General Comments 0
You need to be logged in to leave comments.
Login now