Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

stable repofilter: added option to display only active branches (closes #577)

Changeset ab269fff1b3a

Parent 38323f128ed9

by Piotr Klecha

Changes to one file · Browse files at ab269fff1b3a Showing diff from parent 38323f128ed9 Diff from another changeset...

 
205
206
207
 
 
 
208
209
210
 
226
227
228
229
 
 
 
 
 
230
231
232
 
205
206
207
208
209
210
211
212
213
 
229
230
231
 
232
233
234
235
236
237
238
239
@@ -205,6 +205,9 @@
  text=_('Branch'), popupMode=QToolButton.InstantPopup,   statusTip=_('Display graph the named branch only'))   self._branchMenu = QMenu(self._branchLabel) + self._abranchAction = self._branchMenu.addAction( + _('Display only active branches'), self.refresh) + self._abranchAction.setCheckable(True)   self._cbranchAction = self._branchMenu.addAction(   _('Display closed branches'), self.refresh)   self._cbranchAction.setCheckable(True) @@ -226,7 +229,11 @@
  """Update the list of branches"""   curbranch = self.branch()   - if self._cbranchAction.isChecked(): + if self._abranchAction.isChecked(): + branches = sorted(set([self._repo[n].branch() + for n in self._repo.heads() + if not self._repo[n].extra().get('close')])) + elif self._cbranchAction.isChecked():   branches = sorted(self._repo.branchtags().keys())   else:   branches = self._repo.namedbranches