push: refactor to a try/except for testing for svn

This commit is contained in:
Sean Farley 2015-05-06 11:06:44 -07:00
parent 942392b58e
commit 6c05c798b7

View File

@ -503,9 +503,13 @@ def expushcmd(orig, ui, repo, dest=None, **opts):
if not origdest and dest == 'default' and 'default-push' in paths:
dest = 'default-push'
# hgsubversion does funcky things on push. Just call it directly
if dest in paths and paths[dest].startswith('svn+'):
orig(ui, repo, dest, **opts)
try:
# hgsubversion does funcky things on push. Just call it directly
path = paths[dest]
if path.startswith('svn+'):
orig(ui, repo, dest, **opts)
except KeyError:
pass
if not to:
if ui.configbool('remotenames', 'forceto', False):