Changeset cc866f2fcafa…
Parent a479c0ded724…
by
Changes to one file · Browse files at cc866f2fcafa Showing diff from parent a479c0ded724 Diff from another changeset...
@@ -209,7 +209,7 @@
_uiprops = '''_uifiles _uimtime _shell postpull tabwidth maxdiff
deadbranches _exts _thghiddentags displayname summarylen
- shortname mergetools'''.split()
+ shortname mergetools livebranches'''.split()
_thgrepoprops = '''_thgmqpatchnames thgmqunappliedpatches
_branchheads'''.split()
@@ -241,6 +241,22 @@ return changectx
@propertycache
+ def livebranches(self):
+ '''return a list of live branch names in unicode'''
+ lives = []
+ cl = self.changelog
+ for branch, heads in self.branchmap().iteritems():
+ if branch in self.deadbranches:
+ continue
+ bheads = [h for h in heads if ('close' not in cl.read(h)[5])]
+ if not bheads:
+ # ignore branches with all heads closed
+ continue
+ lives.append(hglib.tounicode(branch))
+ lives.sort()
+ return lives
+
+ @propertycache
def _thghiddentags(self):
ht = self.ui.config('tortoisehg', 'hidetags', '')
return [t.strip() for t in ht.split()]
|
Loading...