Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

workbench: remove use of has_closed_branch_support()

Changeset 72122b0c4960

Parent 1ef797e1d80e

by Adrian Buehlmann

Changes to one file · Browse files at 72122b0c4960 Showing diff from parent 1ef797e1d80e Diff from another changeset...

 
17
18
19
20
 
21
22
23
 
45
46
47
48
49
50
51
 
130
131
132
133
134
135
136
137
138
139
140
141
142
 
 
 
 
 
 
 
 
143
144
145
 
17
18
19
 
20
21
22
23
 
45
46
47
 
48
49
50
 
129
130
131
 
 
 
 
 
 
 
 
 
 
132
133
134
135
136
137
138
139
140
141
142
@@ -17,7 +17,7 @@
 from mercurial import ui, hg, util  from mercurial.error import RepoError   -from tortoisehg.util.util import tounicode, has_closed_branch_support +from tortoisehg.util.util import tounicode  from tortoisehg.util.util import rootpath, find_repository    from tortoisehg.util.i18n import _ @@ -45,7 +45,6 @@
  def __init__(self, ui, repo, fromhead=None):   self.ui = ui   self.repo = repo - self._closed_branch_supp = has_closed_branch_support(self.repo)     # these are used to know where to go after a reload   self._reload_rev = None @@ -130,16 +129,14 @@
    repo = w.repo   allbranches = sorted(repo.branchtags().items()) - if self._closed_branch_supp: - openbr = [] - for branch, brnode in allbranches: - openbr.extend(repo.branchheads(branch, closed=False)) - clbranches = [br for br, node in allbranches if node not in openbr] - branches = [br for br, node in allbranches if node in openbr] - if self.branch_checkBox_action.isChecked(): - branches = branches + clbranches - else: - branches = [br for br, node in allbranches] # open branches + + openbr = [] + for branch, brnode in allbranches: + openbr.extend(repo.branchheads(branch, closed=False)) + clbranches = [br for br, node in allbranches if node not in openbr] + branches = [br for br, node in allbranches if node in openbr] + if self.branch_checkBox_action.isChecked(): + branches = branches + clbranches     if len(branches) == 1:   self.branch_label_action.setEnabled(False)