# HG changeset patch
# User Sean Farley <sean@farley.io>
# Date 1450993877 21600
#      Thu Dec 24 15:51:17 2015 -0600
# Node ID fda82627506057bbb33b16c39adebaf2ee074079
# Parent  a70c1f6caead6f4d82f1bd782c1496a7e034648e
git_handler: add config knob for marking git branches public

diff --git a/hggit/git_handler.py b/hggit/git_handler.py
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -318,17 +318,23 @@
 
         self.save_map(self.map_file)
 
+        # also mark public any branches the user specified
+        blist = [self.repo[branch].node() for branch in
+                 self.ui.configlist('git', 'public')]
         if rnode and self.ui.configbool('hggit', 'usephases'):
+            blist.append(rnode)
+
+        if blist:
             lock = self.repo.lock()
             try:
                 tr = self.repo.transaction("phase")
                 try:
                     phases.advanceboundary(self.repo, tr, phases.public,
-                                           [rnode])
+                                           blist)
                 except TypeError:
                     # hg < 3.2
                     phases.advanceboundary(self.repo, phases.public,
-                                           [rnode])
+                                           blist)
                 tr.close()
             finally:
                 if tr is not None: