From 30f31c13cec7e9d5c219dc1e422c4a3caaf0ed28 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Wed, 10 Aug 2022 23:52:59 -0500 Subject: [PATCH] Skip close check for non-local branches Apparently nowadays some remotes contain a bunch of topic branches which are not pulled by default. Signed-off-by: Felipe Contreras --- git-remote-hg | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/git-remote-hg b/git-remote-hg index 705029a..071be43 100755 --- a/git-remote-hg +++ b/git-remote-hg @@ -741,8 +741,11 @@ def do_list(parser): for branch, heads in items: # only open heads - heads = [h for h in heads if b'close' not in repo.changelog.read(h)[5]] - if heads: + try: + heads = [h for h in heads if b'close' not in repo.changelog.read(h)[5]] + if heads: + branches[branch] = heads + except error.LookupError: branches[branch] = heads list_head(repo, cur)