847 if res: |
847 if res: |
848 dia.exec() |
848 dia.exec() |
849 |
849 |
850 return True |
850 return True |
851 |
851 |
852 def hgRevert(self, name): |
852 def vcsRevert(self, name): |
853 """ |
853 """ |
854 Public method used to revert changes made to a file/directory. |
854 Public method used to revert changes made to a file/directory. |
855 |
855 |
856 @param name file/directory name to be reverted (string) |
856 @param name file/directory name to be reverted |
|
857 @type str |
857 @return flag indicating, that the update contained an add |
858 @return flag indicating, that the update contained an add |
858 or delete (boolean) |
859 or delete |
|
860 @rtype bool |
859 """ |
861 """ |
860 args = self.initCommand("revert") |
862 args = self.initCommand("revert") |
861 if not self.getPlugin().getPreferences("CreateBackup"): |
863 if not self.getPlugin().getPreferences("CreateBackup"): |
862 args.append("--no-backup") |
864 args.append("--no-backup") |
863 args.append("-v") |
865 args.append("-v") |
1492 output, error = self.__client.runcommand(args) |
1494 output, error = self.__client.runcommand(args) |
1493 |
1495 |
1494 # return file contents with 'universal newlines' |
1496 # return file contents with 'universal newlines' |
1495 return output.replace('\r\n', '\n').replace('\r', '\n'), error |
1497 return output.replace('\r\n', '\n').replace('\r', '\n'), error |
1496 |
1498 |
1497 def hgSbsDiff(self, name, extended=False, revisions=None): |
1499 def vcsSbsDiff(self, name, extended=False, revisions=None): |
1498 """ |
1500 """ |
1499 Public method used to view the difference of a file to the Mercurial |
1501 Public method used to view the difference of a file to the Mercurial |
1500 repository side-by-side. |
1502 repository side-by-side. |
1501 |
1503 |
1502 @param name file name to be diffed (string) |
1504 @param name file name to be diffed (string) |
1760 self.conflictsDlg = HgConflictsListDialog(self) |
1762 self.conflictsDlg = HgConflictsListDialog(self) |
1761 self.conflictsDlg.show() |
1763 self.conflictsDlg.show() |
1762 self.conflictsDlg.raise_() |
1764 self.conflictsDlg.raise_() |
1763 self.conflictsDlg.start() |
1765 self.conflictsDlg.start() |
1764 |
1766 |
1765 def hgResolved(self, name, unresolve=False): |
1767 def vcsResolved(self, name, unresolve=False): |
1766 """ |
1768 """ |
1767 Public method used to resolve conflicts of a file/directory. |
1769 Public method used to resolve conflicts of a file/directory. |
1768 |
1770 |
1769 @param name file/directory name to be resolved (string) |
1771 @param name file/directory name to be resolved (string) |
1770 @param unresolve flag indicating to mark the file/directory as |
1772 @param unresolve flag indicating to mark the file/directory as |
2220 self.tr('Mercurial Bisect ({0})').format(subcommand), self) |
2222 self.tr('Mercurial Bisect ({0})').format(subcommand), self) |
2221 res = dia.startProcess(args) |
2223 res = dia.startProcess(args) |
2222 if res: |
2224 if res: |
2223 dia.exec() |
2225 dia.exec() |
2224 |
2226 |
2225 def hgForget(self, name): |
2227 def vcsForget(self, name): |
2226 """ |
2228 """ |
2227 Public method used to remove a file from the Mercurial repository. |
2229 Public method used to remove a file from the Mercurial repository. |
2228 |
2230 |
2229 This will not remove the file from the project directory. |
2231 This will not remove the file from the project directory. |
2230 |
2232 |
2231 @param name file/directory name to be removed (string or list of |
2233 @param name file/directory name to be removed |
2232 strings)) |
2234 @type str or list of str |
2233 """ |
2235 """ |
2234 args = self.initCommand("forget") |
2236 args = self.initCommand("forget") |
2235 args.append('-v') |
2237 args.append('-v') |
2236 |
2238 |
2237 if isinstance(name, list): |
2239 if isinstance(name, list): |