eric6/Plugins/VcsPlugins/vcsPySvn/subversion.py

changeset 8234
fcb6b4b96274
parent 8205
4a0f1f896341
child 8243
cc717c2ae956
equal deleted inserted replaced
8233:bad78a592cc2 8234:fcb6b4b96274
932 if accepted: 932 if accepted:
933 target, force = dlg.getData() 933 target, force = dlg.getData()
934 if not target: 934 if not target:
935 return False 935 return False
936 936
937 if rx_prot.fullmatch(target) is None: 937 isDir = (os.path.isdir(name) if rx_prot.fullmatch(target) is None
938 isDir = os.path.isdir(name) 938 else False)
939 else:
940 isDir = False
941 939
942 if accepted: 940 if accepted:
943 client = self.getClient() 941 client = self.getClient()
944 if rx_prot.fullmatch(target) is not None: 942 if rx_prot.fullmatch(target) is not None:
945 target = self.__svnURL(target) 943 target = self.__svnURL(target)
990 being edited and has unsaved modification, they can be saved or the 988 being edited and has unsaved modification, they can be saved or the
991 operation may be aborted. 989 operation may be aborted.
992 990
993 @param name file/directory name to be diffed (string) 991 @param name file/directory name to be diffed (string)
994 """ 992 """
995 if isinstance(name, list): 993 names = name[:] if isinstance(name, list) else [name]
996 names = name[:]
997 else:
998 names = [name]
999 for nam in names: 994 for nam in names:
1000 if os.path.isfile(nam): 995 if os.path.isfile(nam):
1001 editor = e5App().getObject("ViewManager").getOpenEditor(nam) 996 editor = e5App().getObject("ViewManager").getOpenEditor(nam)
1002 if editor and not editor.checkDirty(): 997 if editor and not editor.checkDirty():
1003 return 998 return
2034 2029
2035 This method gives the chance to enter the revisions to be compared. 2030 This method gives the chance to enter the revisions to be compared.
2036 2031
2037 @param name file/directory name to be diffed (string) 2032 @param name file/directory name to be diffed (string)
2038 """ 2033 """
2039 if isinstance(name, list): 2034 names = name[:] if isinstance(name, list) else [name]
2040 names = name[:]
2041 else:
2042 names = [name]
2043 for nam in names: 2035 for nam in names:
2044 if os.path.isfile(nam): 2036 if os.path.isfile(nam):
2045 editor = e5App().getObject("ViewManager").getOpenEditor(nam) 2037 editor = e5App().getObject("ViewManager").getOpenEditor(nam)
2046 if editor and not editor.checkDirty(): 2038 if editor and not editor.checkDirty():
2047 return 2039 return
2073 2065
2074 This method gives the chance to enter the revisions to be compared. 2066 This method gives the chance to enter the revisions to be compared.
2075 2067
2076 @param name file/directory name to be diffed (string) 2068 @param name file/directory name to be diffed (string)
2077 """ 2069 """
2078 if isinstance(name, list): 2070 names = name[:] if isinstance(name, list) else [name]
2079 names = name[:]
2080 else:
2081 names = [name]
2082 for nam in names: 2071 for nam in names:
2083 if os.path.isfile(nam): 2072 if os.path.isfile(nam):
2084 editor = e5App().getObject("ViewManager").getOpenEditor(nam) 2073 editor = e5App().getObject("ViewManager").getOpenEditor(nam)
2085 if editor and not editor.checkDirty(): 2074 if editor and not editor.checkDirty():
2086 return 2075 return
2362 """ 2351 """
2363 Public method to open the repository browser. 2352 Public method to open the repository browser.
2364 2353
2365 @param projectPath path name of the project (string) 2354 @param projectPath path name of the project (string)
2366 """ 2355 """
2367 if projectPath: 2356 url = self.svnGetReposName(projectPath) if projectPath else None
2368 url = self.svnGetReposName(projectPath)
2369 else:
2370 url = None
2371
2372 if url is None: 2357 if url is None:
2373 url, ok = QInputDialog.getText( 2358 url, ok = QInputDialog.getText(
2374 None, 2359 None,
2375 self.tr("Repository Browser"), 2360 self.tr("Repository Browser"),
2376 self.tr("Enter the repository URL."), 2361 self.tr("Enter the repository URL."),

eric ide

mercurial