Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0.1, 1.0.2, and 1.0.3

stable hglib: remove closed branches from live branch list

Closes #879

Changeset e7a6c9670ccf

Parent f4b1111dd067

by Steve Borho

Changes to one file · Browse files at e7a6c9670ccf Showing diff from parent f4b1111dd067 Diff from another changeset...

 
107
108
109
110
111
112
 
 
 
 
 
 
 
 
 
 
 
113
114
115
 
107
108
109
 
 
 
110
111
112
113
114
115
116
117
118
119
120
121
122
123
@@ -107,9 +107,17 @@
  '''return a list of live branch names in UTF-8'''   lives = []   deads = getdeadbranch(repo.ui) - for branch in repo.branchtags().keys(): # encoded in UTF-8 - if branch not in deads: - lives.append(branch.replace('\0', '')) + cl = repo.changelog + for branch, heads in repo.branchmap().iteritems(): + # branch encoded in UTF-8 + if branch in deads: + # ignore branch names in tortoisehg.deadbranch + 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(branch.replace('\0', ''))   return lives    _hidetags = None