917 being edited and has unsaved modification, they can be saved or the |
915 being edited and has unsaved modification, they can be saved or the |
918 operation may be aborted. |
916 operation may be aborted. |
919 |
917 |
920 @param name file/directory name to be diffed (string) |
918 @param name file/directory name to be diffed (string) |
921 """ |
919 """ |
922 if isinstance(name, list): |
920 names = name[:] if isinstance(name, list) else [name] |
923 names = name[:] |
|
924 else: |
|
925 names = [name] |
|
926 for nam in names: |
921 for nam in names: |
927 if os.path.isfile(nam): |
922 if os.path.isfile(nam): |
928 editor = e5App().getObject("ViewManager").getOpenEditor(nam) |
923 editor = e5App().getObject("ViewManager").getOpenEditor(nam) |
929 if editor and not editor.checkDirty(): |
924 if editor and not editor.checkDirty(): |
930 return |
925 return |
973 """The URL of the project repository could not be""" |
968 """The URL of the project repository could not be""" |
974 """ retrieved from the working copy. The tag operation""" |
969 """ retrieved from the working copy. The tag operation""" |
975 """ will be aborted""")) |
970 """ will be aborted""")) |
976 return |
971 return |
977 |
972 |
978 if self.otherData["standardLayout"]: |
973 url = ( |
979 url = None |
974 None |
980 else: |
975 if self.otherData["standardLayout"] else |
981 url = self.svnNormalizeURL(reposURL) |
976 self.svnNormalizeURL(reposURL) |
|
977 ) |
982 from .SvnTagDialog import SvnTagDialog |
978 from .SvnTagDialog import SvnTagDialog |
983 dlg = SvnTagDialog(self.allTagsBranchesList, url, |
979 dlg = SvnTagDialog(self.allTagsBranchesList, url, |
984 self.otherData["standardLayout"]) |
980 self.otherData["standardLayout"]) |
985 if dlg.exec() == QDialog.DialogCode.Accepted: |
981 if dlg.exec() == QDialog.DialogCode.Accepted: |
986 tag, tagOp = dlg.getParameters() |
982 tag, tagOp = dlg.getParameters() |
1096 """The URL of the project repository could not be""" |
1092 """The URL of the project repository could not be""" |
1097 """ retrieved from the working copy. The switch""" |
1093 """ retrieved from the working copy. The switch""" |
1098 """ operation will be aborted""")) |
1094 """ operation will be aborted""")) |
1099 return False |
1095 return False |
1100 |
1096 |
1101 if self.otherData["standardLayout"]: |
1097 url = ( |
1102 url = None |
1098 None |
1103 else: |
1099 if self.otherData["standardLayout"] else |
1104 url = self.svnNormalizeURL(reposURL) |
1100 self.svnNormalizeURL(reposURL) |
|
1101 ) |
1105 from .SvnSwitchDialog import SvnSwitchDialog |
1102 from .SvnSwitchDialog import SvnSwitchDialog |
1106 dlg = SvnSwitchDialog(self.allTagsBranchesList, url, |
1103 dlg = SvnSwitchDialog(self.allTagsBranchesList, url, |
1107 self.otherData["standardLayout"]) |
1104 self.otherData["standardLayout"]) |
1108 if dlg.exec() == QDialog.DialogCode.Accepted: |
1105 if dlg.exec() == QDialog.DialogCode.Accepted: |
1109 tag, tagType = dlg.getParameters() |
1106 tag, tagType = dlg.getParameters() |
1891 |
1888 |
1892 This method gives the chance to enter the revisions to be compared. |
1889 This method gives the chance to enter the revisions to be compared. |
1893 |
1890 |
1894 @param name file/directory name to be diffed (string) |
1891 @param name file/directory name to be diffed (string) |
1895 """ |
1892 """ |
1896 if isinstance(name, list): |
1893 names = name[:] if isinstance(name, list) else [name] |
1897 names = name[:] |
|
1898 else: |
|
1899 names = [name] |
|
1900 for nam in names: |
1894 for nam in names: |
1901 if os.path.isfile(nam): |
1895 if os.path.isfile(nam): |
1902 editor = e5App().getObject("ViewManager").getOpenEditor(nam) |
1896 editor = e5App().getObject("ViewManager").getOpenEditor(nam) |
1903 if editor and not editor.checkDirty(): |
1897 if editor and not editor.checkDirty(): |
1904 return |
1898 return |
1927 |
1921 |
1928 This method gives the chance to enter the revisions to be compared. |
1922 This method gives the chance to enter the revisions to be compared. |
1929 |
1923 |
1930 @param name file/directory name to be diffed (string) |
1924 @param name file/directory name to be diffed (string) |
1931 """ |
1925 """ |
1932 if isinstance(name, list): |
1926 names = name[:] if isinstance(name, list) else [name] |
1933 names = name[:] |
|
1934 else: |
|
1935 names = [name] |
|
1936 for nam in names: |
1927 for nam in names: |
1937 if os.path.isfile(nam): |
1928 if os.path.isfile(nam): |
1938 editor = e5App().getObject("ViewManager").getOpenEditor(nam) |
1929 editor = e5App().getObject("ViewManager").getOpenEditor(nam) |
1939 if editor and not editor.checkDirty(): |
1930 if editor and not editor.checkDirty(): |
1940 return |
1931 return |
2166 """ |
2157 """ |
2167 Public method to open the repository browser. |
2158 Public method to open the repository browser. |
2168 |
2159 |
2169 @param projectPath path name of the project (string) |
2160 @param projectPath path name of the project (string) |
2170 """ |
2161 """ |
2171 if projectPath: |
2162 url = self.svnGetReposName(projectPath) if projectPath else None |
2172 url = self.svnGetReposName(projectPath) |
|
2173 else: |
|
2174 url = None |
|
2175 |
2163 |
2176 if url is None: |
2164 if url is None: |
2177 url, ok = QInputDialog.getText( |
2165 url, ok = QInputDialog.getText( |
2178 None, |
2166 None, |
2179 self.tr("Repository Browser"), |
2167 self.tr("Repository Browser"), |