diff -r 4efb36ecaaec -r e07003a94ef3 mercurial/commands.py --- a/mercurial/commands.py Sat Dec 05 23:37:46 2015 -0800 +++ b/mercurial/commands.py Sun Dec 06 11:49:02 2015 -0800 @@ -5639,7 +5639,8 @@ 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 = path.pushloc or path.loc + branches = (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)