mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
push: refactor to a try/except for testing for svn
This commit is contained in:
parent
942392b58e
commit
6c05c798b7
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user