16 class Strip(HgExtension): |
16 class Strip(HgExtension): |
17 """ |
17 """ |
18 Class implementing the strip extension interface. |
18 Class implementing the strip extension interface. |
19 """ |
19 """ |
20 |
20 |
21 def __init__(self, vcs): |
21 def __init__(self, vcs, ui=None): |
22 """ |
22 """ |
23 Constructor |
23 Constructor |
24 |
24 |
25 @param vcs reference to the Mercurial vcs object |
25 @param vcs reference to the Mercurial vcs object |
26 @type Hg |
26 @type Hg |
|
27 @param ui reference to a UI widget (defaults to None) |
|
28 @type QWidget |
27 """ |
29 """ |
28 super().__init__(vcs) |
30 super().__init__(vcs, ui=ui) |
29 |
31 |
30 def hgStrip(self, rev=""): |
32 def hgStrip(self, rev=""): |
31 """ |
33 """ |
32 Public method to strip revisions from a repository. |
34 Public method to strip revisions from a repository. |
33 |
35 |
42 dlg = HgStripDialog( |
44 dlg = HgStripDialog( |
43 self.vcs.hgGetTagsList(), |
45 self.vcs.hgGetTagsList(), |
44 self.vcs.hgGetBranchesList(), |
46 self.vcs.hgGetBranchesList(), |
45 self.vcs.hgGetBookmarksList(), |
47 self.vcs.hgGetBookmarksList(), |
46 rev, |
48 rev, |
|
49 parent=self.ui, |
47 ) |
50 ) |
48 if dlg.exec() == QDialog.DialogCode.Accepted: |
51 if dlg.exec() == QDialog.DialogCode.Accepted: |
49 rev, bookmark, force, noBackup, keep = dlg.getData() |
52 rev, bookmark, force, noBackup, keep = dlg.getData() |
50 |
53 |
51 args = self.vcs.initCommand("strip") |
54 args = self.vcs.initCommand("strip") |