marcos ojeda committed 1fed3af

add remotebranches.alias.showbranch config to hide /default branches

this is meant to be used in conjunction with remotebranches.alias.default

alias.default = True
alias.showbranch = False

will cause remotebranches to only create short named local tags rather than the standard "remote/default, remote" which is created when you set alias.default = True

This probably has the effect of nuking the default/default tag

  • Participants
  • Parent commits cec7524

Comments (0)

Files changed (1)


             f = open(bfile, 'w')
             if existed:
+            alias_default = ui.configbool('remotebranches', 'alias.default')
+            alias_showbranch = ui.configbool('remotebranches', 'alias.showbranch') if alias_default else True
             for branch, nodes in bm.iteritems():
                 for n in nodes:
-                    f.write('%s %s/%s\n' % (node.hex(n), remote, branch))
-                    alias_default = ui.configbool('remotebranches', 'alias.default')
+                    if alias_showbranch:
+                        f.write('%s %s/%s\n' % (node.hex(n), remote, branch))
                     if remote != 'default' and branch == 'default' and alias_default:
                         f.write('%s %s\n' % (node.hex(n), remote))
                 real[branch] = [node.hex(x) for x in nodes]