eric7/Plugins/VcsPlugins/vcsGit/git.py

branch
eric7
changeset 8621
8c9f41115c04
parent 8358
144a6b854f70
child 8624
5192a2592324
equal deleted inserted replaced
8620:84f7f7867b5f 8621:8c9f41115c04
667 dia.exec() 667 dia.exec()
668 res = dia.normalExitWithoutErrors() 668 res = dia.normalExitWithoutErrors()
669 669
670 return res 670 return res
671 671
672 def vcsForget(self, name):
673 """
674 Public method used to remove a file from the Mercurial repository.
675
676 This will not remove the file from the project directory.
677
678 @param name file/directory name to be removed
679 @type str or list of str
680 """
681 self.vcsRemove(name, stageOnly=True)
682
672 def vcsMove(self, name, project, target=None, noDialog=False): 683 def vcsMove(self, name, project, target=None, noDialog=False):
673 """ 684 """
674 Public method used to move a file/directory. 685 Public method used to move a file/directory.
675 686
676 @param name file/directory name to be moved (string) 687 @param name file/directory name to be moved (string)
843 res = dia.hasAddOrDelete() 854 res = dia.hasAddOrDelete()
844 self.checkVCSStatus() 855 self.checkVCSStatus()
845 856
846 return res 857 return res
847 858
848 def gitRevert(self, name): 859 def vcsRevert(self, name):
849 """ 860 """
850 Public method used to revert changes made to a file/directory. 861 Public method used to revert changes made to a file/directory.
851 862
852 @param name file/directory name to be reverted (string) 863 @param name file/directory name to be reverted
864 @type str
853 @return flag indicating, that the update contained an add 865 @return flag indicating, that the update contained an add
854 or delete (boolean) 866 or delete
867 @rtype bool
855 """ 868 """
856 args = self.initCommand("checkout") 869 args = self.initCommand("checkout")
857 args.append("--") 870 args.append("--")
858 if isinstance(name, list): 871 if isinstance(name, list):
859 dname, fnames = self.splitPathList(name) 872 dname, fnames = self.splitPathList(name)
1566 'Ensure, that it is in the search path.').format('git') 1579 'Ensure, that it is in the search path.').format('git')
1567 1580
1568 # return file contents with 'universal newlines' 1581 # return file contents with 'universal newlines'
1569 return output.replace('\r\n', '\n').replace('\r', '\n'), error 1582 return output.replace('\r\n', '\n').replace('\r', '\n'), error
1570 1583
1571 def gitSbsDiff(self, name, extended=False, revisions=None): 1584 def vcsSbsDiff(self, name, extended=False, revisions=None):
1572 """ 1585 """
1573 Public method used to view the difference of a file to the Git 1586 Public method used to view the difference of a file to the Git
1574 repository side-by-side. 1587 repository side-by-side.
1575 1588
1576 @param name file name to be diffed (string) 1589 @param name file name to be diffed (string)

eric ide

mercurial