diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-05-24 21:29:54 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-05-28 08:02:05 -0700 |
commit | c2f7a82032bff3f516aa7d029506aed096a01e0b (patch) | |
tree | ea0fd7e981f8f2d62807eed769f38e93acf91668 /contrib/remote-helpers | |
parent | 611024e606c8019d348ab1821a1fbb1898384a25 (diff) | |
download | git-c2f7a82032bff3f516aa7d029506aed096a01e0b.tar.gz git-c2f7a82032bff3f516aa7d029506aed096a01e0b.tar.xz |
remote-hg: improve branch listing
We want to show the remote heads, not the internal ones, which might
have garbage.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/remote-helpers')
-rwxr-xr-x | contrib/remote-helpers/git-remote-hg | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 8df72d90c..5ad5c1e1a 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -605,9 +605,12 @@ def do_list(parser): list_head(repo, cur) if track_branches: - for branch in repo.branchmap(): - heads = repo.branchheads(branch) - if len(heads): + orig = peer if peer else repo + + for branch, heads in orig.branchmap().iteritems(): + # only open heads + heads = [h for h in heads if 'close' not in repo.changelog.read(h)[5]] + if heads: branches[branch] = heads for branch in branches: |