comparison mercurial/destutil.py @ 28233:9da2283d0c56

destutil: add new local variable to increase readability Before this patch, local variable 'heads' is used not only for "all branch heads" but also for "branch heads other than current parent". This patch newly adds local variable 'otherheads' for the latter purpose, to increase readability.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 24 Feb 2016 23:00:32 +0900
parents fac3a24be50e
children 2c29f157463e
comparison
equal deleted inserted replaced
28232:829d369fc5a8 28233:9da2283d0c56
358 currentbranch = repo.dirstate.branch() 358 currentbranch = repo.dirstate.branch()
359 heads = repo.branchheads(currentbranch) 359 heads = repo.branchheads(currentbranch)
360 l = len(heads) 360 l = len(heads)
361 if repo.revs('%ln and parents()', heads): 361 if repo.revs('%ln and parents()', heads):
362 # we are on a head 362 # we are on a head
363 heads = repo.revs('%ln - parents()', heads) 363 otherheads = repo.revs('%ln - parents()', heads)
364 if heads and l != len(heads): 364 if otherheads and l != len(otherheads):
365 ui.status(_('%i other heads for branch "%s"\n') % 365 ui.status(_('%i other heads for branch "%s"\n') %
366 (len(heads), currentbranch)) 366 (len(otherheads), currentbranch))
367 367
368 def statusotherdests(ui, repo): 368 def statusotherdests(ui, repo):
369 """Print message about other head""" 369 """Print message about other head"""
370 # XXX we should probably include a hint: 370 # XXX we should probably include a hint:
371 # - about what to do 371 # - about what to do