src/eric7/Plugins/VcsPlugins/vcsPySvn/subversion.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 10403
ea3320d5e8e9
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
43 def __init__(self, plugin, parent=None, name=None): 43 def __init__(self, plugin, parent=None, name=None):
44 """ 44 """
45 Constructor 45 Constructor
46 46
47 @param plugin reference to the plugin object 47 @param plugin reference to the plugin object
48 @param parent parent widget (QWidget) 48 @type VcsSubversionPlugin
49 @param name name of this object (string) 49 @param parent parent widget
50 @type QWidget
51 @param name name of this object
52 @type str
50 """ 53 """
51 VersionControl.__init__(self, parent, name) 54 VersionControl.__init__(self, parent, name)
52 self.defaultOptions = { 55 self.defaultOptions = {
53 "global": [""], 56 "global": [""],
54 "commit": [""], 57 "commit": [""],
109 112
110 def getPlugin(self): 113 def getPlugin(self):
111 """ 114 """
112 Public method to get a reference to the plugin object. 115 Public method to get a reference to the plugin object.
113 116
114 @return reference to the plugin object (VcsPySvnPlugin) 117 @return reference to the plugin object
118 @rtype VcsPySvnPlugin
115 """ 119 """
116 return self.__plugin 120 return self.__plugin
117 121
118 def getClient(self): 122 def getClient(self):
119 """ 123 """
120 Public method to create and initialize the pysvn client object. 124 Public method to create and initialize the pysvn client object.
121 125
122 @return the pysvn client object (pysvn.Client) 126 @return the pysvn client object
127 @rtype pysvn.Client
123 """ 128 """
124 configDir = "" 129 configDir = ""
125 authCache = True 130 authCache = True
126 for arg in self.options["global"]: 131 for arg in self.options["global"]:
127 if arg.startswith("--config-dir"): 132 if arg.startswith("--config-dir"):
164 169
165 def vcsExists(self): 170 def vcsExists(self):
166 """ 171 """
167 Public method used to test for the presence of the svn executable. 172 Public method used to test for the presence of the svn executable.
168 173
169 @return flag indicating the existance (boolean) and an error message 174 @return flag indicating the existance and an error message
170 (string) 175 @rtype tuple of (bool, str)
171 """ 176 """
172 self.versionStr = ".".join([str(v) for v in pysvn.svn_version[:-1]]) 177 self.versionStr = ".".join([str(v) for v in pysvn.svn_version[:-1]])
173 self.version = pysvn.svn_version[:-1] 178 self.version = pysvn.svn_version[:-1]
174 return True, "" 179 return True, ""
175 180
179 184
180 The subversion repository has to be initialized from outside eric 185 The subversion repository has to be initialized from outside eric
181 because the respective command always works locally. Therefore we 186 because the respective command always works locally. Therefore we
182 always return TRUE without doing anything. 187 always return TRUE without doing anything.
183 188
184 @param vcsDir name of the VCS directory (string) 189 @param vcsDir name of the VCS directory
185 @param noDialog flag indicating quiet operations (boolean) 190 @type str
186 @return always TRUE 191 @param noDialog flag indicating quiet operations
192 @type bool
193 @return always True
194 @rtype bool
187 """ 195 """
188 return True 196 return True
189 197
190 def vcsConvertProject(self, vcsDataDict, project, addAll=True): 198 def vcsConvertProject(self, vcsDataDict, project, addAll=True):
191 """ 199 """
260 Public method used to import the project into the Subversion 268 Public method used to import the project into the Subversion
261 repository. 269 repository.
262 270
263 @param vcsDataDict dictionary of data required for the import 271 @param vcsDataDict dictionary of data required for the import
264 @type dict 272 @type dict
265 @param projectDir project directory (string) 273 @param projectDir project directory
266 @type str 274 @type str
267 @param noDialog flag indicating quiet operations 275 @param noDialog flag indicating quiet operations
268 @type bool 276 @type bool
269 @param addAll flag indicating to add all files to the repository 277 @param addAll flag indicating to add all files to the repository
270 @type bool 278 @type bool
340 """ 348 """
341 Public method used to check the project out of the Subversion 349 Public method used to check the project out of the Subversion
342 repository. 350 repository.
343 351
344 @param vcsDataDict dictionary of data required for the checkout 352 @param vcsDataDict dictionary of data required for the checkout
345 @param projectDir project directory to create (string) 353 @type dict
354 @param projectDir project directory to create
355 @type str
346 @param noDialog flag indicating quiet operations 356 @param noDialog flag indicating quiet operations
347 @return flag indicating an execution without errors (boolean) 357 @type bool
358 @return flag indicating an execution without errors
359 @rtype bool
348 """ 360 """
349 noDialog = False 361 noDialog = False
350 try: 362 try:
351 tag = vcsDataDict["tag"] 363 tag = vcsDataDict["tag"]
352 except KeyError: 364 except KeyError:
411 """ 423 """
412 Public method used to export a directory from the Subversion 424 Public method used to export a directory from the Subversion
413 repository. 425 repository.
414 426
415 @param vcsDataDict dictionary of data required for the checkout 427 @param vcsDataDict dictionary of data required for the checkout
416 @param projectDir project directory to create (string) 428 @type dict
417 @return flag indicating an execution without errors (boolean) 429 @param projectDir project directory to create
430 @type str
431 @return flag indicating an execution without errors
432 @rtype bool
418 """ 433 """
419 try: 434 try:
420 tag = vcsDataDict["tag"] 435 tag = vcsDataDict["tag"]
421 except KeyError: 436 except KeyError:
422 tag = None 437 tag = None
474 def vcsCommit(self, name, message, noDialog=False): 489 def vcsCommit(self, name, message, noDialog=False):
475 """ 490 """
476 Public method used to make the change of a file/directory permanent 491 Public method used to make the change of a file/directory permanent
477 in the Subversion repository. 492 in the Subversion repository.
478 493
479 @param name file/directory name to be committed (string or 494 @param name file/directory name to be committed
480 list of strings) 495 @type str or list of str
481 @param message message for this operation (string) 496 @param message message for this operation
497 @type str
482 @param noDialog flag indicating quiet operations 498 @param noDialog flag indicating quiet operations
499 @type bool
483 """ 500 """
484 from .SvnCommitDialog import SvnCommitDialog 501 from .SvnCommitDialog import SvnCommitDialog
485 502
486 if not noDialog and not message: 503 if not noDialog and not message:
487 # call CommitDialog and get message from there 504 # call CommitDialog and get message from there
660 def vcsUpdate(self, name, noDialog=False): 677 def vcsUpdate(self, name, noDialog=False):
661 """ 678 """
662 Public method used to update a file/directory with the Subversion 679 Public method used to update a file/directory with the Subversion
663 repository. 680 repository.
664 681
665 @param name file/directory name to be updated (string or list of 682 @param name file/directory name to be updated
666 strings) 683 @type (str or list of str
667 @param noDialog flag indicating quiet operations (boolean) 684 @param noDialog flag indicating quiet operations
668 @return flag indicating, that the update contained an add 685 @type bool
669 or delete (boolean) 686 @return flag indicating, that the update contained an add or delete
687 @rtype bool
670 """ 688 """
671 if isinstance(name, list): 689 if isinstance(name, list):
672 dname, fnames = self.splitPathList(name) 690 dname, fnames = self.splitPathList(name)
673 else: 691 else:
674 dname, fname = self.splitPath(name) 692 dname, fname = self.splitPath(name)
706 def vcsAdd(self, name, isDir=False, noDialog=False): 724 def vcsAdd(self, name, isDir=False, noDialog=False):
707 """ 725 """
708 Public method used to add a file/directory to the Subversion 726 Public method used to add a file/directory to the Subversion
709 repository. 727 repository.
710 728
711 @param name file/directory name to be added (string) 729 @param name file/directory name to be added
712 @param isDir flag indicating name is a directory (boolean) 730 @type str
713 @param noDialog flag indicating quiet operations (boolean) 731 @param isDir flag indicating name is a directory
732 @type bool
733 @param noDialog flag indicating quiet operations
734 @type bool
714 """ 735 """
715 if isinstance(name, list): 736 if isinstance(name, list):
716 if isDir: 737 if isDir:
717 dname, fname = os.path.split(name[0]) 738 dname, fname = os.path.split(name[0])
718 else: 739 else:
813 def vcsAddBinary(self, name, isDir=False): 834 def vcsAddBinary(self, name, isDir=False):
814 """ 835 """
815 Public method used to add a file/directory in binary mode to the 836 Public method used to add a file/directory in binary mode to the
816 Subversion repository. 837 Subversion repository.
817 838
818 @param name file/directory name to be added (string) 839 @param name file/directory name to be added
819 @param isDir flag indicating name is a directory (boolean) 840 @type str
841 @param isDir flag indicating name is a directory
842 @type bool
820 """ 843 """
821 self.vcsAdd(name, isDir) 844 self.vcsAdd(name, isDir)
822 845
823 def vcsAddTree(self, path): 846 def vcsAddTree(self, path):
824 """ 847 """
825 Public method to add a directory tree rooted at path to the Subversion 848 Public method to add a directory tree rooted at path to the Subversion
826 repository. 849 repository.
827 850
828 @param path root directory of the tree to be added (string or list of 851 @param path root directory of the tree to be added
829 strings)) 852 @type str or list of str
830 """ 853 """
831 tree = [] 854 tree = []
832 if isinstance(path, list): 855 if isinstance(path, list):
833 dname, fnames = self.splitPathList(path) 856 dname, fnames = self.splitPathList(path)
834 for n in path: 857 for n in path:
920 Public method used to remove a file/directory from the Subversion 943 Public method used to remove a file/directory from the Subversion
921 repository. 944 repository.
922 945
923 The default operation is to remove the local copy as well. 946 The default operation is to remove the local copy as well.
924 947
925 @param name file/directory name to be removed (string or list of 948 @param name file/directory name to be removed
926 strings)) 949 @type str or list of str
927 @param project flag indicating deletion of a project tree (boolean) 950 @param project flag indicating deletion of a project tree
928 (not needed) 951 @type bool
929 @param noDialog flag indicating quiet operations 952 @param noDialog flag indicating quiet operations
930 @return flag indicating successfull operation (boolean) 953 @type bool
954 @return flag indicating successfull operation
955 @rtype bool
931 """ 956 """
932 if not isinstance(name, list): 957 if not isinstance(name, list):
933 name = [name] 958 name = [name]
934 opts = self.options["global"] + self.options["remove"] 959 opts = self.options["global"] + self.options["remove"]
935 force = "--force" in opts or noDialog 960 force = "--force" in opts or noDialog
957 982
958 def vcsMove(self, name, project, target=None, noDialog=False): 983 def vcsMove(self, name, project, target=None, noDialog=False):
959 """ 984 """
960 Public method used to move a file/directory. 985 Public method used to move a file/directory.
961 986
962 @param name file/directory name to be moved (string) 987 @param name file/directory name to be moved
988 @type str
963 @param project reference to the project object 989 @param project reference to the project object
964 @param target new name of the file/directory (string) 990 @type Project
991 @param target new name of the file/directory
992 @type str
965 @param noDialog flag indicating quiet operations 993 @param noDialog flag indicating quiet operations
966 @return flag indicating successfull operation (boolean) 994 @type bool
995 @return flag indicating successfull operation
996 @rtype bool
967 """ 997 """
968 from .SvnCopyDialog import SvnCopyDialog 998 from .SvnCopyDialog import SvnCopyDialog
969 999
970 rx_prot = re.compile("(file:|svn:|svn+ssh:|http:|https:).+") 1000 rx_prot = re.compile("(file:|svn:|svn+ssh:|http:|https:).+")
971 opts = self.options["global"] 1001 opts = self.options["global"]
1038 If name is a directory and is the project directory, all project files 1068 If name is a directory and is the project directory, all project files
1039 are saved first. If name is a file (or list of files), which is/are 1069 are saved first. If name is a file (or list of files), which is/are
1040 being edited and has unsaved modification, they can be saved or the 1070 being edited and has unsaved modification, they can be saved or the
1041 operation may be aborted. 1071 operation may be aborted.
1042 1072
1043 @param name file/directory name to be diffed (string) 1073 @param name file/directory name to be diffed
1074 @type str
1044 """ 1075 """
1045 from .SvnDiffDialog import SvnDiffDialog 1076 from .SvnDiffDialog import SvnDiffDialog
1046 1077
1047 names = name[:] if isinstance(name, list) else [name] 1078 names = name[:] if isinstance(name, list) else [name]
1048 for nam in names: 1079 for nam in names:
1065 """ 1096 """
1066 Public method used to view the status of files/directories in the 1097 Public method used to view the status of files/directories in the
1067 Subversion repository. 1098 Subversion repository.
1068 1099
1069 @param name file/directory name(s) to show the status of 1100 @param name file/directory name(s) to show the status of
1070 (string or list of strings) 1101 @type str or list of str
1071 """ 1102 """
1072 from .SvnStatusDialog import SvnStatusDialog 1103 from .SvnStatusDialog import SvnStatusDialog
1073 1104
1074 if self.status is None: 1105 if self.status is None:
1075 self.status = SvnStatusDialog(self) 1106 self.status = SvnStatusDialog(self)
1081 def vcsTag(self, name): 1112 def vcsTag(self, name):
1082 """ 1113 """
1083 Public method used to set the tag of a file/directory in the 1114 Public method used to set the tag of a file/directory in the
1084 Subversion repository. 1115 Subversion repository.
1085 1116
1086 @param name file/directory name to be tagged (string) 1117 @param name file/directory name to be tagged
1118 @type str
1087 """ 1119 """
1088 from .SvnTagDialog import SvnTagDialog 1120 from .SvnTagDialog import SvnTagDialog
1089 1121
1090 dname, fname = self.splitPath(name) 1122 dname, fname = self.splitPath(name)
1091 1123
1248 1280
1249 def vcsSwitch(self, name): 1281 def vcsSwitch(self, name):
1250 """ 1282 """
1251 Public method used to switch a directory to a different tag/branch. 1283 Public method used to switch a directory to a different tag/branch.
1252 1284
1253 @param name directory name to be switched (string) 1285 @param name directory name to be switched
1254 @return flag indicating, that the switch contained an add 1286 @type str
1255 or delete (boolean) 1287 @return flag indicating, that the switch contained an add or delete
1288 @rtype bool
1256 """ 1289 """
1257 from .SvnSwitchDialog import SvnSwitchDialog 1290 from .SvnSwitchDialog import SvnSwitchDialog
1258 1291
1259 dname, fname = self.splitPath(name) 1292 dname, fname = self.splitPath(name)
1260 1293
1334 1367
1335 def vcsMerge(self, name): 1368 def vcsMerge(self, name):
1336 """ 1369 """
1337 Public method used to merge a URL/revision into the local project. 1370 Public method used to merge a URL/revision into the local project.
1338 1371
1339 @param name file/directory name to be merged (string) 1372 @param name file/directory name to be merged
1373 @type str
1340 """ 1374 """
1341 from .SvnMergeDialog import SvnMergeDialog 1375 from .SvnMergeDialog import SvnMergeDialog
1342 1376
1343 dname, fname = self.splitPath(name) 1377 dname, fname = self.splitPath(name)
1344 1378
1445 1479
1446 def vcsRegisteredState(self, name): 1480 def vcsRegisteredState(self, name):
1447 """ 1481 """
1448 Public method used to get the registered state of a file in the vcs. 1482 Public method used to get the registered state of a file in the vcs.
1449 1483
1450 @param name filename to check (string) 1484 @param name filename to check
1451 @return a combination of canBeCommited and canBeAdded 1485 @type str
1486 @return registered state (one of canBeCommited and canBeAdded)
1487 @rtype int
1452 """ 1488 """
1453 if self.__wcng: 1489 if self.__wcng:
1454 return self.__vcsRegisteredState_wcng(name) 1490 return self.__vcsRegisteredState_wcng(name)
1455 else: 1491 else:
1456 return self.__vcsRegisteredState_wc(name) 1492 return self.__vcsRegisteredState_wc(name)
1460 Private method used to get the registered state of a file in the vcs. 1496 Private method used to get the registered state of a file in the vcs.
1461 1497
1462 This is the variant for subversion installations using the new 1498 This is the variant for subversion installations using the new
1463 working copy meta-data format. 1499 working copy meta-data format.
1464 1500
1465 @param name filename to check (string) 1501 @param name filename to check
1466 @return a combination of canBeCommited and canBeAdded 1502 @type str
1503 @return registered state (one of canBeCommited and canBeAdded)
1504 @rtype int
1467 """ 1505 """
1468 if name.endswith(os.sep): 1506 if name.endswith(os.sep):
1469 name = name[:-1] 1507 name = name[:-1]
1470 name = os.path.normcase(name) 1508 name = os.path.normcase(name)
1471 dname, fname = self.splitPath(name) 1509 dname, fname = self.splitPath(name)
1489 Private method used to get the registered state of a file in the vcs. 1527 Private method used to get the registered state of a file in the vcs.
1490 1528
1491 This is the variant for subversion installations using the old working 1529 This is the variant for subversion installations using the old working
1492 copy meta-data format. 1530 copy meta-data format.
1493 1531
1494 @param name filename to check (string) 1532 @param name filename to check
1495 @return a combination of canBeCommited and canBeAdded 1533 @type str
1534 @return registered state (one of canBeCommited and canBeAdded)
1535 @rtype int
1496 """ 1536 """
1497 dname, fname = self.splitPath(name) 1537 dname, fname = self.splitPath(name)
1498 1538
1499 if fname == ".": 1539 if fname == ".":
1500 if os.path.isdir(os.path.join(dname, self.adminDir)): 1540 if os.path.isdir(os.path.join(dname, self.adminDir)):
1518 <b>Note:</b> If a shortcut is to be taken, the code will only check, 1558 <b>Note:</b> If a shortcut is to be taken, the code will only check,
1519 if the named directory has been scanned already. If so, it is assumed, 1559 if the named directory has been scanned already. If so, it is assumed,
1520 that the states for all files has been populated by the previous run. 1560 that the states for all files has been populated by the previous run.
1521 1561
1522 @param names dictionary with all filenames to be checked as keys 1562 @param names dictionary with all filenames to be checked as keys
1523 @param dname directory to check in (string) 1563 @type dict
1524 @param shortcut flag indicating a shortcut should be taken (boolean) 1564 @param dname directory to check in
1565 @type str
1566 @param shortcut flag indicating a shortcut should be taken
1567 @type bool
1525 @return the received dictionary completed with a combination of 1568 @return the received dictionary completed with a combination of
1526 canBeCommited and canBeAdded or None in order to signal an error 1569 canBeCommited and canBeAdded or None in order to signal an error
1570 @rtype dict
1527 """ 1571 """
1528 if self.__wcng: 1572 if self.__wcng:
1529 return self.__vcsAllRegisteredStates_wcng(names, dname, shortcut) 1573 return self.__vcsAllRegisteredStates_wcng(names, dname, shortcut)
1530 else: 1574 else:
1531 return self.__vcsAllRegisteredStates_wc(names, dname, shortcut) 1575 return self.__vcsAllRegisteredStates_wc(names, dname, shortcut)
1541 <b>Note:</b> If a shortcut is to be taken, the code will only check, 1585 <b>Note:</b> If a shortcut is to be taken, the code will only check,
1542 if the named directory has been scanned already. If so, it is assumed, 1586 if the named directory has been scanned already. If so, it is assumed,
1543 that the states for all files has been populated by the previous run. 1587 that the states for all files has been populated by the previous run.
1544 1588
1545 @param names dictionary with all filenames to be checked as keys 1589 @param names dictionary with all filenames to be checked as keys
1546 @param dname directory to check in (string) 1590 @type dict
1547 @param shortcut flag indicating a shortcut should be taken (boolean) 1591 @param dname directory to check in
1592 @type str
1593 @param shortcut flag indicating a shortcut should be taken
1594 @type bool
1548 @return the received dictionary completed with a combination of 1595 @return the received dictionary completed with a combination of
1549 canBeCommited and canBeAdded or None in order to signal an error 1596 canBeCommited and canBeAdded or None in order to signal an error
1597 @rtype dict
1550 """ 1598 """
1551 from .SvnDialogMixin import SvnDialogMixin 1599 from .SvnDialogMixin import SvnDialogMixin
1552 1600
1553 if dname.endswith(os.sep): 1601 if dname.endswith(os.sep):
1554 dname = dname[:-1] 1602 dname = dname[:-1]
1619 <b>Note:</b> If a shortcut is to be taken, the code will only check, 1667 <b>Note:</b> If a shortcut is to be taken, the code will only check,
1620 if the named directory has been scanned already. If so, it is assumed, 1668 if the named directory has been scanned already. If so, it is assumed,
1621 that the states for all files has been populated by the previous run. 1669 that the states for all files has been populated by the previous run.
1622 1670
1623 @param names dictionary with all filenames to be checked as keys 1671 @param names dictionary with all filenames to be checked as keys
1624 @param dname directory to check in (string) 1672 @type dict
1625 @param shortcut flag indicating a shortcut should be taken (boolean) 1673 @param dname directory to check in
1674 @type str
1675 @param shortcut flag indicating a shortcut should be taken
1676 @type bool
1626 @return the received dictionary completed with a combination of 1677 @return the received dictionary completed with a combination of
1627 canBeCommited and canBeAdded or None in order to signal an error 1678 canBeCommited and canBeAdded or None in order to signal an error
1679 @rtype dict
1628 """ 1680 """
1629 from .SvnDialogMixin import SvnDialogMixin 1681 from .SvnDialogMixin import SvnDialogMixin
1630 1682
1631 if not os.path.isdir(os.path.join(dname, self.adminDir)): 1683 if not os.path.isdir(os.path.join(dname, self.adminDir)):
1632 # not under version control -> do nothing 1684 # not under version control -> do nothing
1669 def __isVersioned(self, status): 1721 def __isVersioned(self, status):
1670 """ 1722 """
1671 Private method to check, if the given status indicates a 1723 Private method to check, if the given status indicates a
1672 versioned state. 1724 versioned state.
1673 1725
1674 @param status status object to check (pysvn.PysvnStatus) 1726 @param status status object to check
1675 @return flag indicating a versioned state (boolean) 1727 @type pysvn.PysvnStatus
1728 @return flag indicating a versioned state
1729 @rtype bool
1676 """ 1730 """
1677 return status["text_status"] in [ 1731 return status["text_status"] in [
1678 pysvn.wc_status_kind.normal, 1732 pysvn.wc_status_kind.normal,
1679 pysvn.wc_status_kind.added, 1733 pysvn.wc_status_kind.added,
1680 pysvn.wc_status_kind.missing, 1734 pysvn.wc_status_kind.missing,
1696 Public method to initialize the VCS configuration. 1750 Public method to initialize the VCS configuration.
1697 1751
1698 This method ensures, that eric specific files and directories are 1752 This method ensures, that eric specific files and directories are
1699 ignored. 1753 ignored.
1700 1754
1701 @param project reference to the project (Project) 1755 @param project reference to the project
1756 @type Project
1702 """ 1757 """
1703 configPath = getConfigPath() 1758 configPath = getConfigPath()
1704 if os.path.exists(configPath): 1759 if os.path.exists(configPath):
1705 amendConfig() 1760 amendConfig()
1706 else: 1761 else:
1708 1763
1709 def vcsName(self): 1764 def vcsName(self):
1710 """ 1765 """
1711 Public method returning the name of the vcs. 1766 Public method returning the name of the vcs.
1712 1767
1713 @return always 'Subversion' (string) 1768 @return always 'Subversion'
1769 @rtype str
1714 """ 1770 """
1715 return "Subversion" 1771 return "Subversion"
1716 1772
1717 def vcsCleanup(self, name): 1773 def vcsCleanup(self, name):
1718 """ 1774 """
1719 Public method used to cleanup the working copy. 1775 Public method used to cleanup the working copy.
1720 1776
1721 @param name directory name to be cleaned up (string) 1777 @param name directory name to be cleaned up
1778 @type str
1722 """ 1779 """
1723 client = self.getClient() 1780 client = self.getClient()
1724 dlg = SvnDialog( 1781 dlg = SvnDialog(
1725 self.tr("Cleaning up {0}").format(name), "cleanup {0}".format(name), client 1782 self.tr("Cleaning up {0}").format(name), "cleanup {0}".format(name), client
1726 ) 1783 )
1735 1792
1736 def vcsCommandLine(self, name): 1793 def vcsCommandLine(self, name):
1737 """ 1794 """
1738 Public method used to execute arbitrary subversion commands. 1795 Public method used to execute arbitrary subversion commands.
1739 1796
1740 @param name directory name of the working directory (string) 1797 @param name directory name of the working directory
1798 @type str
1741 """ 1799 """
1742 from eric7.Plugins.VcsPlugins.vcsSubversion.SvnDialog import ( 1800 from eric7.Plugins.VcsPlugins.vcsSubversion.SvnDialog import (
1743 SvnDialog as SvnProcessDialog, 1801 SvnDialog as SvnProcessDialog,
1744 ) 1802 )
1745 1803
1772 ): 1830 ):
1773 """ 1831 """
1774 Public method to get a dialog to enter repository info. 1832 Public method to get a dialog to enter repository info.
1775 1833
1776 @param project reference to the project object 1834 @param project reference to the project object
1777 @param archive name of the project in the repository (string) 1835 @type Project
1836 @param archive name of the project in the repository
1837 @type str
1778 @param editable flag indicating that the project name is editable 1838 @param editable flag indicating that the project name is editable
1779 (boolean) 1839 @type bool
1780 @param parent parent widget (QWidget) 1840 @param parent parent widget
1781 @return reference to the instantiated options dialog (SvnOptionsDialog) 1841 @type QWidget
1842 @return reference to the instantiated options dialog
1843 @rtype SvnOptionsDialog
1782 """ 1844 """
1783 from .SvnOptionsDialog import SvnOptionsDialog 1845 from .SvnOptionsDialog import SvnOptionsDialog
1784 1846
1785 return SvnOptionsDialog(self, project, parent) 1847 return SvnOptionsDialog(self, project, parent)
1786 1848
1787 def vcsNewProjectOptionsDialog(self, parent=None): 1849 def vcsNewProjectOptionsDialog(self, parent=None):
1788 """ 1850 """
1789 Public method to get a dialog to enter repository info for getting a 1851 Public method to get a dialog to enter repository info for getting a
1790 new project. 1852 new project.
1791 1853
1792 @param parent parent widget (QWidget) 1854 @param parent parent widget
1855 @type QWidget
1793 @return reference to the instantiated options dialog 1856 @return reference to the instantiated options dialog
1794 (SvnNewProjectOptionsDialog) 1857 @rtype SvnNewProjectOptionsDialog
1795 """ 1858 """
1796 from .SvnNewProjectOptionsDialog import SvnNewProjectOptionsDialog 1859 from .SvnNewProjectOptionsDialog import SvnNewProjectOptionsDialog
1797 1860
1798 return SvnNewProjectOptionsDialog(self, parent) 1861 return SvnNewProjectOptionsDialog(self, parent)
1799 1862
1800 def vcsRepositoryInfos(self, ppath): 1863 def vcsRepositoryInfos(self, ppath):
1801 """ 1864 """
1802 Public method to retrieve information about the repository. 1865 Public method to retrieve information about the repository.
1803 1866
1804 @param ppath local path to get the repository infos (string) 1867 @param ppath local path to get the repository infos
1805 @return string with ready formated info for display (string) 1868 @type str
1869 @return string with ready formated info for display
1870 @rtype str
1806 """ 1871 """
1807 try: 1872 try:
1808 entry = self.getClient().info(ppath) 1873 entry = self.getClient().info(ppath)
1809 except pysvn.ClientError as e: 1874 except pysvn.ClientError as e:
1810 return e.args[0] 1875 return e.args[0]
1852 def svnGetReposName(self, path): 1917 def svnGetReposName(self, path):
1853 """ 1918 """
1854 Public method used to retrieve the URL of the subversion repository 1919 Public method used to retrieve the URL of the subversion repository
1855 path. 1920 path.
1856 1921
1857 @param path local path to get the svn repository path for (string) 1922 @param path local path to get the svn repository path for
1923 @type str
1858 @return string with the repository path URL 1924 @return string with the repository path URL
1925 @rtype str
1859 """ 1926 """
1860 client = pysvn.Client() 1927 client = pysvn.Client()
1861 try: 1928 try:
1862 with EricMutexLocker(self.vcsExecutionMutex): 1929 with EricMutexLocker(self.vcsExecutionMutex):
1863 entry = client.info(path) 1930 entry = client.info(path)
1868 1935
1869 def vcsResolved(self, name): 1936 def vcsResolved(self, name):
1870 """ 1937 """
1871 Public method used to resolve conflicts of a file/directory. 1938 Public method used to resolve conflicts of a file/directory.
1872 1939
1873 @param name file/directory name to be resolved (string) 1940 @param name file/directory name to be resolved
1941 @type str
1874 """ 1942 """
1875 if isinstance(name, list): 1943 if isinstance(name, list):
1876 dname, fnames = self.splitPathList(name) 1944 dname, fnames = self.splitPathList(name)
1877 else: 1945 else:
1878 dname, fname = self.splitPath(name) 1946 dname, fname = self.splitPath(name)
1904 1972
1905 def svnCopy(self, name, project): 1973 def svnCopy(self, name, project):
1906 """ 1974 """
1907 Public method used to copy a file/directory. 1975 Public method used to copy a file/directory.
1908 1976
1909 @param name file/directory name to be copied (string) 1977 @param name file/directory name to be copied
1978 @type str
1910 @param project reference to the project object 1979 @param project reference to the project object
1911 @return flag indicating successfull operation (boolean) 1980 @type Project
1981 @return flag indicating successfull operation
1982 @rtype bool
1912 """ 1983 """
1913 from .SvnCopyDialog import SvnCopyDialog 1984 from .SvnCopyDialog import SvnCopyDialog
1914 1985
1915 rx_prot = re.compile("(file:|svn:|svn+ssh:|http:|https:).+") 1986 rx_prot = re.compile("(file:|svn:|svn+ssh:|http:|https:).+")
1916 dlg = SvnCopyDialog(name) 1987 dlg = SvnCopyDialog(name)
1955 2026
1956 def svnListProps(self, name, recursive=False): 2027 def svnListProps(self, name, recursive=False):
1957 """ 2028 """
1958 Public method used to list the properties of a file/directory. 2029 Public method used to list the properties of a file/directory.
1959 2030
1960 @param name file/directory name (string or list of strings) 2031 @param name file/directory name
2032 @type str or list of str
1961 @param recursive flag indicating a recursive list is requested 2033 @param recursive flag indicating a recursive list is requested
2034 @type bool
1962 """ 2035 """
1963 from .SvnPropListDialog import SvnPropListDialog 2036 from .SvnPropListDialog import SvnPropListDialog
1964 2037
1965 if self.propList is None: 2038 if self.propList is None:
1966 self.propList = SvnPropListDialog(self) 2039 self.propList = SvnPropListDialog(self)
1971 2044
1972 def svnSetProp(self, name, recursive=False): 2045 def svnSetProp(self, name, recursive=False):
1973 """ 2046 """
1974 Public method used to add a property to a file/directory. 2047 Public method used to add a property to a file/directory.
1975 2048
1976 @param name file/directory name (string or list of strings) 2049 @param name file/directory name
2050 @type str or list of str
1977 @param recursive flag indicating a recursive set is requested 2051 @param recursive flag indicating a recursive set is requested
2052 @type bool
1978 """ 2053 """
1979 from .SvnPropSetDialog import SvnPropSetDialog 2054 from .SvnPropSetDialog import SvnPropSetDialog
1980 2055
1981 dlg = SvnPropSetDialog(recursive) 2056 dlg = SvnPropSetDialog(recursive)
1982 if dlg.exec() == QDialog.DialogCode.Accepted: 2057 if dlg.exec() == QDialog.DialogCode.Accepted:
2031 2106
2032 def svnDelProp(self, name, recursive=False): 2107 def svnDelProp(self, name, recursive=False):
2033 """ 2108 """
2034 Public method used to delete a property of a file/directory. 2109 Public method used to delete a property of a file/directory.
2035 2110
2036 @param name file/directory name (string or list of strings) 2111 @param name file/directory name
2112 @type str or list of str
2037 @param recursive flag indicating a recursive list is requested 2113 @param recursive flag indicating a recursive list is requested
2114 @type bool
2038 """ 2115 """
2039 from .SvnPropDelDialog import SvnPropDelDialog 2116 from .SvnPropDelDialog import SvnPropDelDialog
2040 2117
2041 dlg = SvnPropDelDialog(recursive) 2118 dlg = SvnPropDelDialog(recursive)
2042 if dlg.exec() == QDialog.DialogCode.Accepted: 2119 if dlg.exec() == QDialog.DialogCode.Accepted:
2087 2164
2088 def svnListTagBranch(self, path, tags=True): 2165 def svnListTagBranch(self, path, tags=True):
2089 """ 2166 """
2090 Public method used to list the available tags or branches. 2167 Public method used to list the available tags or branches.
2091 2168
2092 @param path directory name of the project (string) 2169 @param path directory name of the project
2170 @type str
2093 @param tags flag indicating listing of branches or tags 2171 @param tags flag indicating listing of branches or tags
2094 (False = branches, True = tags) 2172 (False = branches, True = tags)
2173 @type bool
2095 """ 2174 """
2096 from .SvnTagBranchListDialog import SvnTagBranchListDialog 2175 from .SvnTagBranchListDialog import SvnTagBranchListDialog
2097 2176
2098 if self.tagbranchList is None: 2177 if self.tagbranchList is None:
2099 self.tagbranchList = SvnTagBranchListDialog(self) 2178 self.tagbranchList = SvnTagBranchListDialog(self)
2117 2196
2118 def svnBlame(self, name): 2197 def svnBlame(self, name):
2119 """ 2198 """
2120 Public method to show the output of the svn blame command. 2199 Public method to show the output of the svn blame command.
2121 2200
2122 @param name file name to show the blame for (string) 2201 @param name file name to show the blame for
2202 @type str
2123 """ 2203 """
2124 from .SvnBlameDialog import SvnBlameDialog 2204 from .SvnBlameDialog import SvnBlameDialog
2125 2205
2126 if self.blame is None: 2206 if self.blame is None:
2127 self.blame = SvnBlameDialog(self) 2207 self.blame = SvnBlameDialog(self)
2140 being edited and has unsaved modification, they can be saved or the 2220 being edited and has unsaved modification, they can be saved or the
2141 operation may be aborted. 2221 operation may be aborted.
2142 2222
2143 This method gives the chance to enter the revisions to be compared. 2223 This method gives the chance to enter the revisions to be compared.
2144 2224
2145 @param name file/directory name to be diffed (string) 2225 @param name file/directory name to be diffed
2226 @type str
2146 """ 2227 """
2147 from .SvnDiffDialog import SvnDiffDialog 2228 from .SvnDiffDialog import SvnDiffDialog
2148 from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog 2229 from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog
2149 2230
2150 names = name[:] if isinstance(name, list) else [name] 2231 names = name[:] if isinstance(name, list) else [name]
2177 being edited and has unsaved modification, they can be saved or the 2258 being edited and has unsaved modification, they can be saved or the
2178 operation may be aborted. 2259 operation may be aborted.
2179 2260
2180 This method gives the chance to enter the revisions to be compared. 2261 This method gives the chance to enter the revisions to be compared.
2181 2262
2182 @param name file/directory name to be diffed (string) 2263 @param name file/directory name to be diffed
2264 @type str
2183 """ 2265 """
2184 from .SvnDiffDialog import SvnDiffDialog 2266 from .SvnDiffDialog import SvnDiffDialog
2185 from .SvnUrlSelectionDialog import SvnUrlSelectionDialog 2267 from .SvnUrlSelectionDialog import SvnUrlSelectionDialog
2186 2268
2187 names = name[:] if isinstance(name, list) else [name] 2269 names = name[:] if isinstance(name, list) else [name]
2210 def __svnGetFileForRevision(self, name, rev=""): 2292 def __svnGetFileForRevision(self, name, rev=""):
2211 """ 2293 """
2212 Private method to get a file for a specific revision from the 2294 Private method to get a file for a specific revision from the
2213 repository. 2295 repository.
2214 2296
2215 @param name file name to get from the repository (string) 2297 @param name file name to get from the repository
2216 @param rev revision to retrieve (integer or string) 2298 @type str
2217 @return contents of the file (string) and an error message (string) 2299 @param rev revision to retrieve
2300 @type int or str
2301 @return contents of the file (string) and an error message
2302 @rtype str
2218 """ 2303 """
2219 output = "" 2304 output = ""
2220 error = "" 2305 error = ""
2221 2306
2222 client = self.getClient() 2307 client = self.getClient()
2254 def vcsSbsDiff(self, name, extended=False, revisions=None): 2339 def vcsSbsDiff(self, name, extended=False, revisions=None):
2255 """ 2340 """
2256 Public method used to view the difference of a file to the Mercurial 2341 Public method used to view the difference of a file to the Mercurial
2257 repository side-by-side. 2342 repository side-by-side.
2258 2343
2259 @param name file name to be diffed (string) 2344 @param name file name to be diffed
2260 @param extended flag indicating the extended variant (boolean) 2345 @type str
2261 @param revisions tuple of two revisions (tuple of strings) 2346 @param extended flag indicating the extended variant
2347 @type bool
2348 @param revisions tuple of two revisions
2349 @type tuple of (str, str)
2262 @exception ValueError raised to indicate an invalid name parameter type 2350 @exception ValueError raised to indicate an invalid name parameter type
2263 """ 2351 """
2264 from eric7.UI.CompareDialog import CompareDialog 2352 from eric7.UI.CompareDialog import CompareDialog
2265 2353
2266 from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog 2354 from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog
2323 def vcsLogBrowser(self, name, isFile=False): 2411 def vcsLogBrowser(self, name, isFile=False):
2324 """ 2412 """
2325 Public method used to browse the log of a file/directory from the 2413 Public method used to browse the log of a file/directory from the
2326 Subversion repository. 2414 Subversion repository.
2327 2415
2328 @param name file/directory name to show the log of (string) 2416 @param name file/directory name to show the log of
2329 @param isFile flag indicating log for a file is to be shown (boolean) 2417 @type str
2418 @param isFile flag indicating log for a file is to be shown
2419 @type bool
2330 """ 2420 """
2331 from .SvnLogBrowserDialog import SvnLogBrowserDialog 2421 from .SvnLogBrowserDialog import SvnLogBrowserDialog
2332 2422
2333 if self.logBrowser is None: 2423 if self.logBrowser is None:
2334 self.logBrowser = SvnLogBrowserDialog(self) 2424 self.logBrowser = SvnLogBrowserDialog(self)
2339 2429
2340 def svnLock(self, name, stealIt=False, parent=None): 2430 def svnLock(self, name, stealIt=False, parent=None):
2341 """ 2431 """
2342 Public method used to lock a file in the Subversion repository. 2432 Public method used to lock a file in the Subversion repository.
2343 2433
2344 @param name file/directory name to be locked (string or list of 2434 @param name file/directory name to be locked
2345 strings) 2435 @type str or list of str
2346 @param stealIt flag indicating a forced operation (boolean) 2436 @param stealIt flag indicating a forced operation
2437 @type bool
2347 @param parent reference to the parent object of the subversion dialog 2438 @param parent reference to the parent object of the subversion dialog
2348 (QWidget) 2439 @type QWidget
2349 """ 2440 """
2350 comment, ok = QInputDialog.getText( 2441 comment, ok = QInputDialog.getText(
2351 None, 2442 None,
2352 self.tr("Subversion Lock"), 2443 self.tr("Subversion Lock"),
2353 self.tr("Enter lock comment"), 2444 self.tr("Enter lock comment"),
2390 2481
2391 def svnUnlock(self, name, breakIt=False, parent=None): 2482 def svnUnlock(self, name, breakIt=False, parent=None):
2392 """ 2483 """
2393 Public method used to unlock a file in the Subversion repository. 2484 Public method used to unlock a file in the Subversion repository.
2394 2485
2395 @param name file/directory name to be unlocked (string or list of 2486 @param name file/directory name to be unlocked
2396 strings) 2487 @type str or list of str
2397 @param breakIt flag indicating a forced operation (boolean) 2488 @param breakIt flag indicating a forced operation
2489 @type bool
2398 @param parent reference to the parent object of the subversion dialog 2490 @param parent reference to the parent object of the subversion dialog
2399 (QWidget) 2491 @type QWidget
2400 """ 2492 """
2401 if isinstance(name, list): 2493 if isinstance(name, list):
2402 dname, fnames = self.splitPathList(name) 2494 dname, fnames = self.splitPathList(name)
2403 else: 2495 else:
2404 dname, fname = self.splitPath(name) 2496 dname, fname = self.splitPath(name)
2427 2519
2428 def svnInfo(self, projectPath, name): 2520 def svnInfo(self, projectPath, name):
2429 """ 2521 """
2430 Public method to show repository information about a file or directory. 2522 Public method to show repository information about a file or directory.
2431 2523
2432 @param projectPath path name of the project (string) 2524 @param projectPath path name of the project
2433 @param name file/directory name relative to the project (string) 2525 @type str
2526 @param name file/directory name relative to the project
2527 @type str
2434 """ 2528 """
2435 from .SvnInfoDialog import SvnInfoDialog 2529 from .SvnInfoDialog import SvnInfoDialog
2436 2530
2437 dlg = SvnInfoDialog(self) 2531 dlg = SvnInfoDialog(self)
2438 dlg.start(projectPath, name) 2532 dlg.start(projectPath, name)
2440 2534
2441 def svnRelocate(self, projectPath): 2535 def svnRelocate(self, projectPath):
2442 """ 2536 """
2443 Public method to relocate the working copy to a new repository URL. 2537 Public method to relocate the working copy to a new repository URL.
2444 2538
2445 @param projectPath path name of the project (string) 2539 @param projectPath path name of the project
2540 @type str
2446 """ 2541 """
2447 from .SvnRelocateDialog import SvnRelocateDialog 2542 from .SvnRelocateDialog import SvnRelocateDialog
2448 2543
2449 currUrl = self.svnGetReposName(projectPath) 2544 currUrl = self.svnGetReposName(projectPath)
2450 dlg = SvnRelocateDialog(currUrl) 2545 dlg = SvnRelocateDialog(currUrl)
2470 2565
2471 def svnRepoBrowser(self, projectPath=None): 2566 def svnRepoBrowser(self, projectPath=None):
2472 """ 2567 """
2473 Public method to open the repository browser. 2568 Public method to open the repository browser.
2474 2569
2475 @param projectPath path name of the project (string) 2570 @param projectPath path name of the project
2571 @type str
2476 """ 2572 """
2477 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog 2573 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog
2478 2574
2479 url = self.svnGetReposName(projectPath) if projectPath else None 2575 url = self.svnGetReposName(projectPath) if projectPath else None
2480 if url is None: 2576 if url is None:
2498 Public method to remove a file or directory from its changelist. 2594 Public method to remove a file or directory from its changelist.
2499 2595
2500 Note: Directories will be removed recursively. 2596 Note: Directories will be removed recursively.
2501 2597
2502 @param names name or list of names of file or directory to remove 2598 @param names name or list of names of file or directory to remove
2503 (string) 2599 @type str or list of str
2504 """ 2600 """
2505 if not isinstance(names, list): 2601 if not isinstance(names, list):
2506 names = [names] 2602 names = [names]
2507 client = self.getClient() 2603 client = self.getClient()
2508 dlg = SvnDialog( 2604 dlg = SvnDialog(
2525 Public method to add a file or directory to a changelist. 2621 Public method to add a file or directory to a changelist.
2526 2622
2527 Note: Directories will be added recursively. 2623 Note: Directories will be added recursively.
2528 2624
2529 @param names name or list of names of file or directory to add 2625 @param names name or list of names of file or directory to add
2530 (string) 2626 @type str or list of str
2531 """ 2627 """
2532 if not isinstance(names, list): 2628 if not isinstance(names, list):
2533 names = [names] 2629 names = [names]
2534 2630
2535 clname, ok = QInputDialog.getItem( 2631 clname, ok = QInputDialog.getItem(
2561 2657
2562 def svnShowChangelists(self, path): 2658 def svnShowChangelists(self, path):
2563 """ 2659 """
2564 Public method used to inspect the change lists defined for the project. 2660 Public method used to inspect the change lists defined for the project.
2565 2661
2566 @param path directory name to show change lists for (string) 2662 @param path directory name to show change lists for
2663 @type str
2567 """ 2664 """
2568 from .SvnChangeListsDialog import SvnChangeListsDialog 2665 from .SvnChangeListsDialog import SvnChangeListsDialog
2569 2666
2570 self.changeLists = SvnChangeListsDialog(self) 2667 self.changeLists = SvnChangeListsDialog(self)
2571 self.changeLists.show() 2668 self.changeLists.show()
2574 2671
2575 def svnGetChangelists(self): 2672 def svnGetChangelists(self):
2576 """ 2673 """
2577 Public method to get a list of all defined change lists. 2674 Public method to get a list of all defined change lists.
2578 2675
2579 @return list of defined change list names (list of strings) 2676 @return list of defined change list names
2677 @rtype list of str
2580 """ 2678 """
2581 changelists = [] 2679 changelists = []
2582 client = self.getClient() 2680 client = self.getClient()
2583 if hasattr(client, "get_changelist"): 2681 if hasattr(client, "get_changelist"):
2584 ppath = ericApp().getObject("Project").getProjectPath() 2682 ppath = ericApp().getObject("Project").getProjectPath()
2594 2692
2595 def svnUpgrade(self, path): 2693 def svnUpgrade(self, path):
2596 """ 2694 """
2597 Public method to upgrade the working copy format. 2695 Public method to upgrade the working copy format.
2598 2696
2599 @param path directory name to show change lists for (string) 2697 @param path directory name to show change lists for
2698 @type str
2600 """ 2699 """
2601 client = self.getClient() 2700 client = self.getClient()
2602 dlg = SvnDialog(self.tr("Upgrade"), "upgrade {0}".format(path), client) 2701 dlg = SvnDialog(self.tr("Upgrade"), "upgrade {0}".format(path), client)
2603 QApplication.processEvents() 2702 QApplication.processEvents()
2604 try: 2703 try:
2615 2714
2616 def __svnURL(self, url): 2715 def __svnURL(self, url):
2617 """ 2716 """
2618 Private method to format a url for subversion. 2717 Private method to format a url for subversion.
2619 2718
2620 @param url unformatted url string (string) 2719 @param url unformatted url string
2621 @return properly formated url for subversion (string) 2720 @type str
2721 @return properly formated url for subversion
2722 @rtype str
2622 """ 2723 """
2623 url = self.svnNormalizeURL(url) 2724 url = self.svnNormalizeURL(url)
2624 url = url.split(":", 2) 2725 url = url.split(":", 2)
2625 if len(url) == 3: 2726 if len(url) == 3:
2626 scheme = url[0] 2727 scheme = url[0]
2641 2742
2642 def svnNormalizeURL(self, url): 2743 def svnNormalizeURL(self, url):
2643 """ 2744 """
2644 Public method to normalize a url for subversion. 2745 Public method to normalize a url for subversion.
2645 2746
2646 @param url url string (string) 2747 @param url url string
2647 @return properly normalized url for subversion (string) 2748 @type str
2749 @return properly normalized url for subversion
2750 @rtype str
2648 """ 2751 """
2649 protocol, url = url.split("://", 1) 2752 protocol, url = url.split("://", 1)
2650 if url.startswith("\\\\"): 2753 if url.startswith("\\\\"):
2651 url = url[2:] 2754 url = url[2:]
2652 if protocol == "file": 2755 if protocol == "file":
2668 """ 2771 """
2669 Public method to instanciate a helper object for the different 2772 Public method to instanciate a helper object for the different
2670 project browsers. 2773 project browsers.
2671 2774
2672 @param browser reference to the project browser object 2775 @param browser reference to the project browser object
2776 @type ProjectBaseBrowser
2673 @param project reference to the project object 2777 @param project reference to the project object
2778 @type Project
2674 @param isTranslationsBrowser flag indicating, the helper is requested 2779 @param isTranslationsBrowser flag indicating, the helper is requested
2675 for the translations browser (this needs some special treatment) 2780 for the translations browser (this needs some special treatment)
2781 @type bool
2676 @return the project browser helper object 2782 @return the project browser helper object
2783 @rtype SvnProjectBrowserHelper
2677 """ 2784 """
2678 from .ProjectBrowserHelper import SvnProjectBrowserHelper 2785 from .ProjectBrowserHelper import SvnProjectBrowserHelper
2679 2786
2680 return SvnProjectBrowserHelper(self, browser, project, isTranslationsBrowser) 2787 return SvnProjectBrowserHelper(self, browser, project, isTranslationsBrowser)
2681 2788
2682 def vcsGetProjectHelper(self, project): 2789 def vcsGetProjectHelper(self, project):
2683 """ 2790 """
2684 Public method to instanciate a helper object for the project. 2791 Public method to instanciate a helper object for the project.
2685 2792
2686 @param project reference to the project object 2793 @param project reference to the project object
2794 @type Project
2687 @return the project helper object 2795 @return the project helper object
2796 @rtype PySvnProjectHelper
2688 """ 2797 """
2689 helper = self.__plugin.getProjectHelper() 2798 helper = self.__plugin.getProjectHelper()
2690 helper.setObjects(self, project) 2799 helper.setObjects(self, project)
2691 self.__wcng = ( 2800 self.__wcng = (
2692 os.path.exists(os.path.join(project.getProjectPath(), ".svn", "format")) 2801 os.path.exists(os.path.join(project.getProjectPath(), ".svn", "format"))
2704 """ 2813 """
2705 Protected method to create an instance of the VCS status monitor 2814 Protected method to create an instance of the VCS status monitor
2706 thread. 2815 thread.
2707 2816
2708 @param interval check interval for the monitor thread in seconds 2817 @param interval check interval for the monitor thread in seconds
2709 (integer) 2818 @type int
2710 @param project reference to the project object 2819 @param project reference to the project object
2711 @return reference to the monitor thread (QThread) 2820 @type Project
2821 @return reference to the monitor thread
2822 @rtype SvnStatusMonitorThread
2712 """ 2823 """
2713 from .SvnStatusMonitorThread import SvnStatusMonitorThread 2824 from .SvnStatusMonitorThread import SvnStatusMonitorThread
2714 2825
2715 return SvnStatusMonitorThread(interval, project, self) 2826 return SvnStatusMonitorThread(interval, project, self)

eric ide

mercurial