comparison hgext/convert/subversion.py @ 24856:5c1364b7e5ac stable

convert: avoid traceback in subversion sink We've had a couple reports of subversion tracebacks that trigger when the parents list is empty, and thus block showing what the commit failure was on the next two lines.
author Matt Mackall <mpm@selenic.com>
date Mon, 27 Apr 2015 11:11:26 -0500
parents 216fa1ba9993
children 328739ea70c3
comparison
equal deleted inserted replaced
24855:8015a3cf1380 24856:5c1364b7e5ac
1291 file=messagefile, 1291 file=messagefile,
1292 encoding='utf-8') 1292 encoding='utf-8')
1293 try: 1293 try:
1294 rev = self.commit_re.search(output).group(1) 1294 rev = self.commit_re.search(output).group(1)
1295 except AttributeError: 1295 except AttributeError:
1296 if not files: 1296 if parents and not files:
1297 return parents[0] 1297 return parents[0]
1298 self.ui.warn(_('unexpected svn output:\n')) 1298 self.ui.warn(_('unexpected svn output:\n'))
1299 self.ui.warn(output) 1299 self.ui.warn(output)
1300 raise util.Abort(_('unable to cope with svn output')) 1300 raise util.Abort(_('unable to cope with svn output'))
1301 if commit.rev: 1301 if commit.rev: