eric6/Plugins/VcsPlugins/vcsMercurial/ShelveExtension/shelve.py

branch
maintenance
changeset 8176
31965986ecd1
parent 8043
0acf98cd089a
parent 8143
2c730d5fd177
child 8273
698ae46f40a4
equal deleted inserted replaced
8153:e01ae92db699 8176:31965986ecd1
66 @return flag indicating that the project should be reread (boolean) 66 @return flag indicating that the project should be reread (boolean)
67 """ 67 """
68 res = False 68 res = False
69 from .HgShelveDataDialog import HgShelveDataDialog 69 from .HgShelveDataDialog import HgShelveDataDialog
70 dlg = HgShelveDataDialog(self.vcs.version) 70 dlg = HgShelveDataDialog(self.vcs.version)
71 if dlg.exec() == QDialog.Accepted: 71 if dlg.exec() == QDialog.DialogCode.Accepted:
72 shelveName, dateTime, message, addRemove, keep = dlg.getData() 72 shelveName, dateTime, message, addRemove, keep = dlg.getData()
73 73
74 args = self.vcs.initCommand("shelve") 74 args = self.vcs.initCommand("shelve")
75 if shelveName: 75 if shelveName:
76 args.append("--name") 76 args.append("--name")
120 """ 120 """
121 res = False 121 res = False
122 from .HgUnshelveDataDialog import HgUnshelveDataDialog 122 from .HgUnshelveDataDialog import HgUnshelveDataDialog
123 dlg = HgUnshelveDataDialog(self.__hgGetShelveNamesList(), 123 dlg = HgUnshelveDataDialog(self.__hgGetShelveNamesList(),
124 shelveName=shelveName) 124 shelveName=shelveName)
125 if dlg.exec() == QDialog.Accepted: 125 if dlg.exec() == QDialog.DialogCode.Accepted:
126 shelveName, keep = dlg.getData() 126 shelveName, keep = dlg.getData()
127 self.__unshelveKeep = keep # store for potential continue 127 self.__unshelveKeep = keep # store for potential continue
128 128
129 args = self.vcs.initCommand("unshelve") 129 args = self.vcs.initCommand("unshelve")
130 if keep: 130 if keep:
185 if not shelveNames: 185 if not shelveNames:
186 from .HgShelvesSelectionDialog import HgShelvesSelectionDialog 186 from .HgShelvesSelectionDialog import HgShelvesSelectionDialog
187 dlg = HgShelvesSelectionDialog( 187 dlg = HgShelvesSelectionDialog(
188 self.tr("Select the shelves to be deleted:"), 188 self.tr("Select the shelves to be deleted:"),
189 self.__hgGetShelveNamesList()) 189 self.__hgGetShelveNamesList())
190 if dlg.exec() == QDialog.Accepted: 190 if dlg.exec() == QDialog.DialogCode.Accepted:
191 shelveNames = dlg.getSelectedShelves() 191 shelveNames = dlg.getSelectedShelves()
192 else: 192 else:
193 return 193 return
194 194
195 from UI.DeleteFilesConfirmationDialog import ( 195 from UI.DeleteFilesConfirmationDialog import (
198 dlg = DeleteFilesConfirmationDialog( 198 dlg = DeleteFilesConfirmationDialog(
199 None, 199 None,
200 self.tr("Delete shelves"), 200 self.tr("Delete shelves"),
201 self.tr("Do you really want to delete these shelves?"), 201 self.tr("Do you really want to delete these shelves?"),
202 shelveNames) 202 shelveNames)
203 if dlg.exec() == QDialog.Accepted: 203 if dlg.exec() == QDialog.DialogCode.Accepted:
204 args = self.vcs.initCommand("shelve") 204 args = self.vcs.initCommand("shelve")
205 args.append("--delete") 205 args.append("--delete")
206 args.extend(shelveNames) 206 args.extend(shelveNames)
207 207
208 dia = HgDialog(self.tr('Delete shelves'), self.vcs) 208 dia = HgDialog(self.tr('Delete shelves'), self.vcs)

eric ide

mercurial