Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.1, 2.0.2, and 2.0.3

stable branchop: Show a single commit branch when merge parents belong to same branch

Without this change, when both merge parents belong to the same branch the user
gets to select the commit branch from a combo box which contains two identical
entries. This looks weird, so it is best to show a single entry in the combo box

Changeset 5e1f43414529

Parent bc41ab44a0a7

by Angel Ezquerra

Changes to one file · Browse files at 5e1f43414529 Showing diff from parent bc41ab44a0a7 Diff from another changeset...

 
29
30
31
32
33
 
 
 
 
 
 
 
34
35
36
 
29
30
31
 
 
32
33
34
35
36
37
38
39
40
41
@@ -29,8 +29,13 @@
  lbl = QLabel('<b>'+_('Select branch of merge commit')+'</b>')   layout.addWidget(lbl)   branchCombo = QComboBox() - for p in wctx.parents(): - branchCombo.addItem(hglib.tounicode(p.branch())) + # If both parents belong to the same branch, do not duplicate the + # branch name in the branch select combo + branchlist = [p.branch() for p in wctx.parents()] + if branchlist[0] == branchlist[1]: + branchlist = [branchlist[0]] + for b in branchlist: + branchCombo.addItem(hglib.tounicode(b))   layout.addWidget(branchCombo)   else:   text = '<b>'+_('Changes take effect on next commit')+'</b>'