Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py

branch
Py2 comp.
changeset 3515
1b8381afe38f
parent 3484
645c12de6b0c
parent 3479
5ff8124c73aa
child 3562
ef3f13a2c599
equal deleted inserted replaced
3506:d85fadb263a0 3515:1b8381afe38f
278 )) 278 ))
279 self.hgLogBrowserAct.triggered.connect(self._vcsLogBrowser) 279 self.hgLogBrowserAct.triggered.connect(self._vcsLogBrowser)
280 self.actions.append(self.hgLogBrowserAct) 280 self.actions.append(self.hgLogBrowserAct)
281 281
282 self.vcsDiffAct = E5Action( 282 self.vcsDiffAct = E5Action(
283 self.tr('Show difference'), 283 self.tr('Show differences'),
284 UI.PixmapCache.getIcon("vcsDiff.png"), 284 UI.PixmapCache.getIcon("vcsDiff.png"),
285 self.tr('Show &difference'), 285 self.tr('Show &difference'),
286 0, 0, self, 'mercurial_diff') 286 0, 0, self, 'mercurial_diff')
287 self.vcsDiffAct.setStatusTip(self.tr( 287 self.vcsDiffAct.setStatusTip(self.tr(
288 'Show the difference of the local project to the repository' 288 'Show the difference of the local project to the repository'
289 )) 289 ))
290 self.vcsDiffAct.setWhatsThis(self.tr( 290 self.vcsDiffAct.setWhatsThis(self.tr(
291 """<b>Show difference</b>""" 291 """<b>Show differences</b>"""
292 """<p>This shows the difference of the local project to the""" 292 """<p>This shows differences of the local project to the"""
293 """ repository.</p>""" 293 """ repository.</p>"""
294 )) 294 ))
295 self.vcsDiffAct.triggered.connect(self._vcsDiff) 295 self.vcsDiffAct.triggered.connect(self._vcsDiff)
296 self.actions.append(self.vcsDiffAct) 296 self.actions.append(self.vcsDiffAct)
297 297
298 self.hgExtDiffAct = E5Action( 298 self.hgExtDiffAct = E5Action(
299 self.tr('Show difference (extended)'), 299 self.tr('Show differences (extended)'),
300 UI.PixmapCache.getIcon("vcsDiff.png"), 300 UI.PixmapCache.getIcon("vcsDiff.png"),
301 self.tr('Show difference (extended)'), 301 self.tr('Show differences (extended)'),
302 0, 0, self, 'mercurial_extendeddiff') 302 0, 0, self, 'mercurial_extendeddiff')
303 self.hgExtDiffAct.setStatusTip(self.tr( 303 self.hgExtDiffAct.setStatusTip(self.tr(
304 'Show the difference of revisions of the project to the repository' 304 'Show the difference of revisions of the project to the repository'
305 )) 305 ))
306 self.hgExtDiffAct.setWhatsThis(self.tr( 306 self.hgExtDiffAct.setWhatsThis(self.tr(
307 """<b>Show difference (extended)</b>""" 307 """<b>Show differences (extended)</b>"""
308 """<p>This shows the difference of selectable revisions of the""" 308 """<p>This shows differences of selectable revisions of the"""
309 """ project.</p>""" 309 """ project.</p>"""
310 )) 310 ))
311 self.hgExtDiffAct.triggered.connect(self.__hgExtendedDiff) 311 self.hgExtDiffAct.triggered.connect(self.__hgExtendedDiff)
312 self.actions.append(self.hgExtDiffAct) 312 self.actions.append(self.hgExtDiffAct)
313 313
412 """<p>This merges changes of a revision into the local""" 412 """<p>This merges changes of a revision into the local"""
413 """ project.</p>""" 413 """ project.</p>"""
414 )) 414 ))
415 self.vcsMergeAct.triggered.connect(self._vcsMerge) 415 self.vcsMergeAct.triggered.connect(self._vcsMerge)
416 self.actions.append(self.vcsMergeAct) 416 self.actions.append(self.vcsMergeAct)
417
418 self.hgCancelMergeAct = E5Action(
419 self.tr('Cancel uncommitted merge'),
420 self.tr('Cancel uncommitted merge'),
421 0, 0, self, 'mercurial_cancel_merge')
422 self.hgCancelMergeAct.setStatusTip(self.tr(
423 'Cancel an uncommitted merge and lose all changes'
424 ))
425 self.hgCancelMergeAct.setWhatsThis(self.tr(
426 """<b>Cancel uncommitted merge</b>"""
427 """<p>This cancels an uncommitted merge causing all changes"""
428 """ to be lost.</p>"""
429 ))
430 self.hgCancelMergeAct.triggered.connect(self.__hgCancelMerge)
431 self.actions.append(self.hgCancelMergeAct)
417 432
418 self.vcsResolveAct = E5Action( 433 self.vcsResolveAct = E5Action(
419 self.tr('Conflicts resolved'), 434 self.tr('Conflicts resolved'),
420 self.tr('Con&flicts resolved'), 435 self.tr('Con&flicts resolved'),
421 0, 0, self, 'mercurial_resolve') 436 0, 0, self, 'mercurial_resolve')
1139 menu.addAction(self.hgPhaseAct) 1154 menu.addAction(self.hgPhaseAct)
1140 menu.addSeparator() 1155 menu.addSeparator()
1141 menu.addAction(self.vcsRevertAct) 1156 menu.addAction(self.vcsRevertAct)
1142 menu.addAction(self.vcsMergeAct) 1157 menu.addAction(self.vcsMergeAct)
1143 menu.addAction(self.vcsResolveAct) 1158 menu.addAction(self.vcsResolveAct)
1159 menu.addAction(self.hgCancelMergeAct)
1144 menu.addSeparator() 1160 menu.addSeparator()
1145 menu.addAction(self.vcsSwitchAct) 1161 menu.addAction(self.vcsSwitchAct)
1146 menu.addSeparator() 1162 menu.addSeparator()
1147 if subrepoMenu is not None: 1163 if subrepoMenu is not None:
1148 menu.addMenu(subrepoMenu) 1164 menu.addMenu(subrepoMenu)
1270 """ 1286 """
1271 Private slot used to resolve conflicts of the local project. 1287 Private slot used to resolve conflicts of the local project.
1272 """ 1288 """
1273 self.vcs.hgResolve(self.project.ppath) 1289 self.vcs.hgResolve(self.project.ppath)
1274 1290
1291 def __hgCancelMerge(self):
1292 """
1293 Private slot used to cancel an uncommitted merge.
1294 """
1295 self.vcs.hgCancelMerge(self.project.ppath)
1296
1275 def __hgTagList(self): 1297 def __hgTagList(self):
1276 """ 1298 """
1277 Private slot used to list the tags of the project. 1299 Private slot used to list the tags of the project.
1278 """ 1300 """
1279 self.vcs.hgListTagBranch(self.project.ppath, True) 1301 self.vcs.hgListTagBranch(self.project.ppath, True)

eric ide

mercurial