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

repowidget: allow to rename applied patches with cmenu

Changeset 35674c57e24f

Parent ac2a01cc9888

by Adrian Buehlmann

Changes to one file · Browse files at 35674c57e24f Showing diff from parent ac2a01cc9888 Diff from another changeset...

 
1037
1038
1039
1040
 
1041
1042
1043
 
1114
1115
1116
 
 
1117
1118
1119
 
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
 
1266
1267
1268
1269
 
1270
1271
1272
 
1618
1619
1620
 
 
 
 
 
 
 
 
 
 
1621
1622
1623
 
1037
1038
1039
 
1040
1041
1042
1043
 
1114
1115
1116
1117
1118
1119
1120
1121
 
1253
1254
1255
 
 
 
 
 
 
1256
1257
1258
 
1262
1263
1264
 
1265
1266
1267
1268
 
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
@@ -1037,7 +1037,7 @@
  # isrev = the changeset has an integer revision number   # isctx = changectx or workingctx   # fixed = the changeset is considered permanent - # applid = an applied patch + # applied = an applied patch   # qgoto = applied patch or qparent   isrev = lambda ap, wd, tags: not wd   isctx = lambda ap, wd, tags: True @@ -1114,6 +1114,8 @@
  self.qimportRevision)   entry(submenu, 'mq', applied, _('Finish patch'), 'qfinish',   self.qfinishRevision) + entry(submenu, 'mq', applied, _('Rename patch'), None, + self.qrename)   entry(submenu, 'mq')   entry(submenu, 'rebase', fixed, _('Rebase...'), 'hg-rebase',   self.rebaseRevision) @@ -1251,12 +1253,6 @@
  dlg.output.connect(self.output)   dlg.makeLogVisible.connect(self.makeLogVisible)   dlg.exec_() - def qrenameact(): - dlg = qrename.QRenameDialog(self.repo, self.menuselection[0], self) - dlg.finished.connect(dlg.deleteLater) - dlg.output.connect(self.output) - dlg.makeLogVisible.connect(self.makeLogVisible) - dlg.exec_()     menu = QMenu(self)   acts = [] @@ -1266,7 +1262,7 @@
  (_('Fold patches...'), qfoldact, 'hg-qfold'),   (_('Delete patches...'), qdeleteact, 'hg-qdelete'),   (_('Reorder patches...'), qreorderact, 'hg-qreorder'), - (_('Rename patch...'), qrenameact, None)): + (_('Rename patch...'), self.qrename, None)):   act = QAction(name, self)   act.triggered.connect(cb)   if icon: @@ -1618,6 +1614,16 @@
  self.taskTabsWidget.setCurrentIndex(self.mqTabIndex)   self.mqDemand.forward('qgotoRevision', patchname)   + def qrename(self): + sel = self.menuselection[0] + if not isinstance(sel, str): + sel = self.repo.changectx(sel).thgmqpatchname() + dlg = qrename.QRenameDialog(self.repo, sel, self) + dlg.finished.connect(dlg.deleteLater) + dlg.output.connect(self.output) + dlg.makeLogVisible.connect(self.makeLogVisible) + dlg.exec_() +   def qpushMoveRevision(self):   """Make REV the top applied patch"""   ctx = self.repo.changectx(self.rev)