Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
remote-hg: improve branch listing
author
Felipe Contreras
<felipe.contreras@gmail.com>
Sat, 25 May 2013 02:29:54 +0000
(21:29 -0500)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 28 May 2013 15:02:05 +0000
(08:02 -0700)
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>
contrib/remote-helpers/git-remote-hg
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
611024e
)
diff --git
a/contrib/remote-helpers/git-remote-hg
b/contrib/remote-helpers/git-remote-hg
index 8df72d90c879546cf12324bd4c6518c83a36c501..5ad5c1e1a379d93842b2f5529017fcd9fa1a36d4 100755
(executable)
--- 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: