1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Steve Borho  committed 6fbbe3d

repowidget: do not allow a revision to be merged with itself (fixes #2455)

  • Participants
  • Parent commits ef73155
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/repowidget.py

View file
  • Ignore whitespace
         run.manifest(self.repo.ui, repo=self.repo, rev=self.rev)
 
     def mergeWithRevision(self):
+        pctx = self.repo['.']
+        octx = self.repo[self.rev]
+        if pctx == octx:
+            QMessageBox.warning(self, _('Unable to merge'),
+                _('You cannot merge a revision with itself'))
+            return
         dlg = merge.MergeDialog(self.rev, self.repo, self)
         dlg.exec_()
         dlg.deleteLater()