42 |
43 |
43 def __hgGetShelveNamesList(self): |
44 def __hgGetShelveNamesList(self): |
44 """ |
45 """ |
45 Private method to get the list of shelved changes. |
46 Private method to get the list of shelved changes. |
46 |
47 |
47 @return list of shelved changes (list of string) |
48 @return list of shelved changes |
|
49 @rtype list of str |
48 """ |
50 """ |
49 args = self.vcs.initCommand("shelve") |
51 args = self.vcs.initCommand("shelve") |
50 args.append("--list") |
52 args.append("--list") |
51 args.append("--quiet") |
53 args.append("--quiet") |
52 |
54 |
62 def hgShelve(self, name): |
64 def hgShelve(self, name): |
63 """ |
65 """ |
64 Public method to shelve current changes of files or directories. |
66 Public method to shelve current changes of files or directories. |
65 |
67 |
66 @param name directory or file name (string) or list of directory |
68 @param name directory or file name (string) or list of directory |
67 or file names (list of string) |
69 or file names |
68 @return flag indicating that the project should be reread (boolean) |
70 @type list of str |
|
71 @return flag indicating that the project should be reread |
|
72 @rtype bool |
69 """ |
73 """ |
70 from .HgShelveDataDialog import HgShelveDataDialog |
74 from .HgShelveDataDialog import HgShelveDataDialog |
71 |
75 |
72 res = False |
76 res = False |
73 dlg = HgShelveDataDialog(self.vcs.version) |
77 dlg = HgShelveDataDialog(self.vcs.version) |
116 |
120 |
117 def hgUnshelve(self, shelveName=""): |
121 def hgUnshelve(self, shelveName=""): |
118 """ |
122 """ |
119 Public method to restore shelved changes to the project directory. |
123 Public method to restore shelved changes to the project directory. |
120 |
124 |
121 @param shelveName name of the shelve to restore (string) |
125 @param shelveName name of the shelve to restore |
122 @return flag indicating that the project should be reread (boolean) |
126 @type str |
|
127 @return flag indicating that the project should be reread |
|
128 @rtype bool |
123 """ |
129 """ |
124 from .HgUnshelveDataDialog import HgUnshelveDataDialog |
130 from .HgUnshelveDataDialog import HgUnshelveDataDialog |
125 |
131 |
126 res = False |
132 res = False |
127 dlg = HgUnshelveDataDialog(self.__hgGetShelveNamesList(), shelveName=shelveName) |
133 dlg = HgUnshelveDataDialog(self.__hgGetShelveNamesList(), shelveName=shelveName) |
145 |
151 |
146 def hgUnshelveAbort(self): |
152 def hgUnshelveAbort(self): |
147 """ |
153 """ |
148 Public method to abort the ongoing restore operation. |
154 Public method to abort the ongoing restore operation. |
149 |
155 |
150 @return flag indicating that the project should be reread (boolean) |
156 @return flag indicating that the project should be reread |
|
157 @rtype bool |
151 """ |
158 """ |
152 args = self.vcs.initCommand("unshelve") |
159 args = self.vcs.initCommand("unshelve") |
153 args.append("--abort") |
160 args.append("--abort") |
154 |
161 |
155 dia = HgDialog(self.tr("Abort restore operation"), self.vcs) |
162 dia = HgDialog(self.tr("Abort restore operation"), self.vcs) |
162 |
169 |
163 def hgUnshelveContinue(self): |
170 def hgUnshelveContinue(self): |
164 """ |
171 """ |
165 Public method to continue the ongoing restore operation. |
172 Public method to continue the ongoing restore operation. |
166 |
173 |
167 @return flag indicating that the project should be reread (boolean) |
174 @return flag indicating that the project should be reread |
|
175 @rtype bool |
168 """ |
176 """ |
169 args = self.vcs.initCommand("unshelve") |
177 args = self.vcs.initCommand("unshelve") |
170 if self.__unshelveKeep: |
178 if self.__unshelveKeep: |
171 args.append("--keep") |
179 args.append("--keep") |
172 args.append("--continue") |
180 args.append("--continue") |
181 |
189 |
182 def hgDeleteShelves(self, shelveNames=None): |
190 def hgDeleteShelves(self, shelveNames=None): |
183 """ |
191 """ |
184 Public method to delete named shelves. |
192 Public method to delete named shelves. |
185 |
193 |
186 @param shelveNames name of shelves to delete (list of string) |
194 @param shelveNames name of shelves to delete |
|
195 @type list of str |
187 """ |
196 """ |
188 from .HgShelvesSelectionDialog import HgShelvesSelectionDialog |
197 from .HgShelvesSelectionDialog import HgShelvesSelectionDialog |
189 |
198 |
190 if not shelveNames: |
199 if not shelveNames: |
191 dlg = HgShelvesSelectionDialog( |
200 dlg = HgShelvesSelectionDialog( |