Mercurial > hg-stable
changeset 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 | 829d369fc5a8 |
children | 2c29f157463e |
files | mercurial/destutil.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/destutil.py Fri Feb 12 23:30:18 2016 -0800 +++ b/mercurial/destutil.py Wed Feb 24 23:00:32 2016 +0900 @@ -360,10 +360,10 @@ l = len(heads) if repo.revs('%ln and parents()', heads): # we are on a head - heads = repo.revs('%ln - parents()', heads) - if heads and l != len(heads): + otherheads = repo.revs('%ln - parents()', heads) + if otherheads and l != len(otherheads): ui.status(_('%i other heads for branch "%s"\n') % - (len(heads), currentbranch)) + (len(otherheads), currentbranch)) def statusotherdests(ui, repo): """Print message about other head"""