comparison mercurial/commands.py @ 36960:66651ec259ea

commands: don't check for merge.update() truthiness AFAICT ``stats`` is always a tuple in these cases. We don't need to check if the variable has a truthy value. Differential Revision: https://phab.mercurial-scm.org/D2691
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 05 Mar 2018 00:18:07 -0500
parents 45bfcd16f27e
children 66e64681e0a8
comparison
equal deleted inserted replaced
36959:43815d87c6aa 36960:66651ec259ea
2304 stats = mergemod.graft(repo, ctx, ctx.p1(), 2304 stats = mergemod.graft(repo, ctx, ctx.p1(),
2305 ['local', 'graft']) 2305 ['local', 'graft'])
2306 finally: 2306 finally:
2307 repo.ui.setconfig('ui', 'forcemerge', '', 'graft') 2307 repo.ui.setconfig('ui', 'forcemerge', '', 'graft')
2308 # report any conflicts 2308 # report any conflicts
2309 if stats and stats[3] > 0: 2309 if stats[3] > 0:
2310 # write out state for --continue 2310 # write out state for --continue
2311 nodelines = [repo[rev].hex() + "\n" for rev in revs[pos:]] 2311 nodelines = [repo[rev].hex() + "\n" for rev in revs[pos:]]
2312 repo.vfs.write('graftstate', ''.join(nodelines)) 2312 repo.vfs.write('graftstate', ''.join(nodelines))
2313 extra = '' 2313 extra = ''
2314 if opts.get('user'): 2314 if opts.get('user'):