Plugins/VcsPlugins/vcsPySvn/subversion.py

changeset 3034
7ce719013078
parent 3024
17c01303a239
child 3037
a417a0670a36
equal deleted inserted replaced
3033:58fe260e7469 3034:7ce719013078
308 rev = None 308 rev = None
309 if not noDialog: 309 if not noDialog:
310 dlg.showError(e.args[0]) 310 dlg.showError(e.args[0])
311 locker.unlock() 311 locker.unlock()
312 if not noDialog: 312 if not noDialog:
313 rev and dlg.showMessage(self.trUtf8("Imported revision {0}.\n")\ 313 rev and dlg.showMessage(self.trUtf8("Imported revision {0}.\n")
314 .format(rev.number)) 314 .format(rev.number))
315 dlg.finish() 315 dlg.finish()
316 dlg.exec_() 316 dlg.exec_()
317 os.chdir(cwd) 317 os.chdir(cwd)
318 318
558 self.trUtf8('Commiting changes to Subversion repository'), 558 self.trUtf8('Commiting changes to Subversion repository'),
559 "commit{0}{1}{2}{3} --message {4} {5}".format( 559 "commit{0}{1}{2}{3} --message {4} {5}".format(
560 (not recurse) and " --non-recursive" or "", 560 (not recurse) and " --non-recursive" or "",
561 keeplocks and " --keep-locks" or "", 561 keeplocks and " --keep-locks" or "",
562 keepChangelists and " --keep-changelists" or "", 562 keepChangelists and " --keep-changelists" or "",
563 changelists and \ 563 changelists and
564 " --changelist ".join([""] + changelists) or "", 564 " --changelist ".join([""] + changelists) or "",
565 msg, " ".join(fnames)), 565 msg, " ".join(fnames)),
566 client) 566 client)
567 QApplication.processEvents() 567 QApplication.processEvents()
568 try: 568 try:
661 while not os.path.isdir(os.path.join(repodir, self.adminDir)): 661 while not os.path.isdir(os.path.join(repodir, self.adminDir)):
662 repodir = os.path.dirname(repodir) 662 repodir = os.path.dirname(repodir)
663 if os.path.splitdrive(repodir)[1] == os.sep: 663 if os.path.splitdrive(repodir)[1] == os.sep:
664 return # oops, project is not version controlled 664 return # oops, project is not version controlled
665 while os.path.normcase(dname) != os.path.normcase(repodir) and \ 665 while os.path.normcase(dname) != os.path.normcase(repodir) and \
666 (os.path.normcase(dname) not in self.statusCache or \ 666 (os.path.normcase(dname) not in self.statusCache or
667 self.statusCache[os.path.normcase(dname)] == 667 self.statusCache[os.path.normcase(dname)] ==
668 self.canBeAdded): 668 self.canBeAdded):
669 # add directories recursively, if they aren't in the 669 # add directories recursively, if they aren't in the
670 # repository already 670 # repository already
671 tree.insert(-1, dname) 671 tree.insert(-1, dname)
672 dname = os.path.dirname(dname) 672 dname = os.path.dirname(dname)
692 if os.path.splitdrive(repodir)[1] == os.sep: 692 if os.path.splitdrive(repodir)[1] == os.sep:
693 return # oops, project is not version controlled 693 return # oops, project is not version controlled
694 while os.path.normcase(d) != \ 694 while os.path.normcase(d) != \
695 os.path.normcase(repodir) and \ 695 os.path.normcase(repodir) and \
696 (d not in tree2 + tree) and \ 696 (d not in tree2 + tree) and \
697 (os.path.normcase(d) not in self.statusCache or \ 697 (os.path.normcase(d) not in self.statusCache or
698 self.statusCache[os.path.normcase(d)] == 698 self.statusCache[os.path.normcase(d)] ==
699 self.canBeAdded): 699 self.canBeAdded):
700 tree2.append(d) 700 tree2.append(d)
701 d = os.path.dirname(d) 701 d = os.path.dirname(d)
702 else: 702 else:
703 while not os.path.exists(os.path.join(d, self.adminDir)): 703 while not os.path.exists(os.path.join(d, self.adminDir)):
772 if os.path.splitdrive(repodir)[1] == os.sep: 772 if os.path.splitdrive(repodir)[1] == os.sep:
773 return # oops, project is not version controlled 773 return # oops, project is not version controlled
774 while os.path.normcase(d) != \ 774 while os.path.normcase(d) != \
775 os.path.normcase(repodir) and \ 775 os.path.normcase(repodir) and \
776 (d not in tree) and \ 776 (d not in tree) and \
777 (os.path.normcase(d) not in self.statusCache or \ 777 (os.path.normcase(d) not in self.statusCache or
778 self.statusCache[os.path.normcase(d)] == 778 self.statusCache[os.path.normcase(d)] ==
779 self.canBeAdded): 779 self.canBeAdded):
780 tree.append(d) 780 tree.append(d)
781 d = os.path.dirname(d) 781 d = os.path.dirname(d)
782 else: 782 else:
783 while not os.path.exists(os.path.join(d, self.adminDir)): 783 while not os.path.exists(os.path.join(d, self.adminDir)):
796 repodir = os.path.dirname(repodir) 796 repodir = os.path.dirname(repodir)
797 if os.path.splitdrive(repodir)[1] == os.sep: 797 if os.path.splitdrive(repodir)[1] == os.sep:
798 return # oops, project is not version controlled 798 return # oops, project is not version controlled
799 while os.path.normcase(dname) != \ 799 while os.path.normcase(dname) != \
800 os.path.normcase(repodir) and \ 800 os.path.normcase(repodir) and \
801 (os.path.normcase(dname) not in self.statusCache or \ 801 (os.path.normcase(dname) not in self.statusCache or
802 self.statusCache[os.path.normcase(dname)] == 802 self.statusCache[os.path.normcase(dname)] ==
803 self.canBeAdded): 803 self.canBeAdded):
804 # add directories recursively, if they aren't in the 804 # add directories recursively, if they aren't in the
805 # repository already 805 # repository already
806 tree.insert(-1, dname) 806 tree.insert(-1, dname)
807 dname = os.path.dirname(dname) 807 dname = os.path.dirname(dname)
986 """ 986 """
987 Public method used to view the difference of a file/directory to the 987 Public method used to view the difference of a file/directory to the
988 Subversion repository. 988 Subversion repository.
989 989
990 If name is a directory and is the project directory, all project files 990 If name is a directory and is the project directory, all project files
991 are saved first. If name is a file (or list of files), which is/are 991 are saved first. If name is a file (or list of files), which is/are
992 being edited and has unsaved modification, they can be saved or the 992 being edited and has unsaved modification, they can be saved or the
993 operation may be aborted. 993 operation may be aborted.
994 994
995 @param name file/directory name to be diffed (string) 995 @param name file/directory name to be diffed (string)
996 """ 996 """

eric ide

mercurial