marcos ojeda avatar 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

setting
[remotebranches]
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

Comments (0)

Files changed (1)

hg_remotebranches.py

             f = open(bfile, 'w')
             if existed:
                 f.write(''.join(olddata))
+            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]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.