Plugins/VcsPlugins/vcsMercurial/QueuesExtension/queues.py

changeset 1318
6fa303bd65d6
parent 1255
e1d8a8a4d40c
child 1509
c0b5e693b0eb
equal deleted inserted replaced
1316:0bb67aced672 1318:6fa303bd65d6
244 """ 244 """
245 # find the root of the repo 245 # find the root of the repo
246 repodir = self.vcs.splitPath(name)[0] 246 repodir = self.vcs.splitPath(name)[0]
247 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 247 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
248 repodir = os.path.dirname(repodir) 248 repodir = os.path.dirname(repodir)
249 if repodir == os.sep: 249 if os.path.splitdrive(repodir)[1] == os.sep:
250 return 250 return
251 251
252 dlg = HgQueuesNewPatchDialog(HgQueuesNewPatchDialog.NEW_MODE) 252 dlg = HgQueuesNewPatchDialog(HgQueuesNewPatchDialog.NEW_MODE)
253 if dlg.exec_() == QDialog.Accepted: 253 if dlg.exec_() == QDialog.Accepted:
254 name, message, (userData, currentUser, userName), \ 254 name, message, (userData, currentUser, userName), \
289 """ 289 """
290 # find the root of the repo 290 # find the root of the repo
291 repodir = self.vcs.splitPath(name)[0] 291 repodir = self.vcs.splitPath(name)[0]
292 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 292 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
293 repodir = os.path.dirname(repodir) 293 repodir = os.path.dirname(repodir)
294 if repodir == os.sep: 294 if os.path.splitdrive(repodir)[1] == os.sep:
295 return 295 return
296 296
297 args = [] 297 args = []
298 args.append("qrefresh") 298 args.append("qrefresh")
299 299
365 """ 365 """
366 # find the root of the repo 366 # find the root of the repo
367 repodir = self.vcs.splitPath(name)[0] 367 repodir = self.vcs.splitPath(name)[0]
368 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 368 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
369 repodir = os.path.dirname(repodir) 369 repodir = os.path.dirname(repodir)
370 if repodir == os.sep: 370 if os.path.splitdrive(repodir)[1] == os.sep:
371 return False 371 return False
372 372
373 args = [] 373 args = []
374 if operation == Queues.POP: 374 if operation == Queues.POP:
375 args.append("qpop") 375 args.append("qpop")
435 """ 435 """
436 # find the root of the repo 436 # find the root of the repo
437 repodir = self.vcs.splitPath(name)[0] 437 repodir = self.vcs.splitPath(name)[0]
438 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 438 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
439 repodir = os.path.dirname(repodir) 439 repodir = os.path.dirname(repodir)
440 if repodir == os.sep: 440 if os.path.splitdrive(repodir)[1] == os.sep:
441 return 441 return
442 442
443 args = [] 443 args = []
444 args.append("qfinish") 444 args.append("qfinish")
445 args.append("--applied") 445 args.append("--applied")
458 """ 458 """
459 # find the root of the repo 459 # find the root of the repo
460 repodir = self.vcs.splitPath(name)[0] 460 repodir = self.vcs.splitPath(name)[0]
461 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 461 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
462 repodir = os.path.dirname(repodir) 462 repodir = os.path.dirname(repodir)
463 if repodir == os.sep: 463 if os.path.splitdrive(repodir)[1] == os.sep:
464 return 464 return
465 465
466 args = [] 466 args = []
467 args.append("qrename") 467 args.append("qrename")
468 patchnames = sorted(self.__getPatchesList(repodir, Queues.SERIES_LIST)) 468 patchnames = sorted(self.__getPatchesList(repodir, Queues.SERIES_LIST))
489 """ 489 """
490 # find the root of the repo 490 # find the root of the repo
491 repodir = self.vcs.splitPath(name)[0] 491 repodir = self.vcs.splitPath(name)[0]
492 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 492 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
493 repodir = os.path.dirname(repodir) 493 repodir = os.path.dirname(repodir)
494 if repodir == os.sep: 494 if os.path.splitdrive(repodir)[1] == os.sep:
495 return 495 return
496 496
497 args = [] 497 args = []
498 args.append("qdelete") 498 args.append("qdelete")
499 patchnames = sorted(self.__getPatchesList(repodir, Queues.UNAPPLIED_LIST)) 499 patchnames = sorted(self.__getPatchesList(repodir, Queues.UNAPPLIED_LIST))
524 """ 524 """
525 # find the root of the repo 525 # find the root of the repo
526 repodir = self.vcs.splitPath(name)[0] 526 repodir = self.vcs.splitPath(name)[0]
527 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 527 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
528 repodir = os.path.dirname(repodir) 528 repodir = os.path.dirname(repodir)
529 if repodir == os.sep: 529 if os.path.splitdrive(repodir)[1] == os.sep:
530 return 530 return
531 531
532 args = [] 532 args = []
533 args.append("qfold") 533 args.append("qfold")
534 patchnames = sorted( 534 patchnames = sorted(
564 """ 564 """
565 # find the root of the repo 565 # find the root of the repo
566 repodir = self.vcs.splitPath(name)[0] 566 repodir = self.vcs.splitPath(name)[0]
567 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 567 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
568 repodir = os.path.dirname(repodir) 568 repodir = os.path.dirname(repodir)
569 if repodir == os.sep: 569 if os.path.splitdrive(repodir)[1] == os.sep:
570 return 570 return
571 571
572 patchnames = sorted( 572 patchnames = sorted(
573 self.__getPatchesList(repodir, Queues.SERIES_LIST)) 573 self.__getPatchesList(repodir, Queues.SERIES_LIST))
574 if patchnames: 574 if patchnames:
598 """ 598 """
599 # find the root of the repo 599 # find the root of the repo
600 repodir = self.vcs.splitPath(name)[0] 600 repodir = self.vcs.splitPath(name)[0]
601 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 601 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
602 repodir = os.path.dirname(repodir) 602 repodir = os.path.dirname(repodir)
603 if repodir == os.sep: 603 if os.path.splitdrive(repodir)[1] == os.sep:
604 return 604 return
605 605
606 patchnames = sorted( 606 patchnames = sorted(
607 self.__getPatchesList(repodir, Queues.SERIES_LIST)) 607 self.__getPatchesList(repodir, Queues.SERIES_LIST))
608 if patchnames: 608 if patchnames:
623 """ 623 """
624 # find the root of the repo 624 # find the root of the repo
625 repodir = self.vcs.splitPath(name)[0] 625 repodir = self.vcs.splitPath(name)[0]
626 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 626 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
627 repodir = os.path.dirname(repodir) 627 repodir = os.path.dirname(repodir)
628 if repodir == os.sep: 628 if os.path.splitdrive(repodir)[1] == os.sep:
629 return 629 return
630 630
631 patchnames = sorted( 631 patchnames = sorted(
632 self.__getPatchesList(repodir, Queues.SERIES_LIST)) 632 self.__getPatchesList(repodir, Queues.SERIES_LIST))
633 if patchnames: 633 if patchnames:
668 """ 668 """
669 # find the root of the repo 669 # find the root of the repo
670 repodir = self.vcs.splitPath(name)[0] 670 repodir = self.vcs.splitPath(name)[0]
671 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 671 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
672 repodir = os.path.dirname(repodir) 672 repodir = os.path.dirname(repodir)
673 if repodir == os.sep: 673 if os.path.splitdrive(repodir)[1] == os.sep:
674 return 674 return
675 675
676 guardsList = self.getGuardsList(repodir) 676 guardsList = self.getGuardsList(repodir)
677 if guardsList: 677 if guardsList:
678 activeGuardsList = self.getGuardsList(repodir, all=False) 678 activeGuardsList = self.getGuardsList(repodir, all=False)
703 """ 703 """
704 # find the root of the repo 704 # find the root of the repo
705 repodir = self.vcs.splitPath(name)[0] 705 repodir = self.vcs.splitPath(name)[0]
706 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 706 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
707 repodir = os.path.dirname(repodir) 707 repodir = os.path.dirname(repodir)
708 if repodir == os.sep: 708 if os.path.splitdrive(repodir)[1] == os.sep:
709 return 709 return
710 710
711 args = [] 711 args = []
712 args.append("qselect") 712 args.append("qselect")
713 args.append("--none") 713 args.append("--none")
725 """ 725 """
726 # find the root of the repo 726 # find the root of the repo
727 repodir = self.vcs.splitPath(name)[0] 727 repodir = self.vcs.splitPath(name)[0]
728 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 728 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
729 repodir = os.path.dirname(repodir) 729 repodir = os.path.dirname(repodir)
730 if repodir == os.sep: 730 if os.path.splitdrive(repodir)[1] == os.sep:
731 return 731 return
732 732
733 guardsList = self.getGuardsList(repodir, all=False) 733 guardsList = self.getGuardsList(repodir, all=False)
734 if guardsList: 734 if guardsList:
735 dlg = HgQueuesGuardsSelectionDialog(guardsList, listOnly=True) 735 dlg = HgQueuesGuardsSelectionDialog(guardsList, listOnly=True)
744 """ 744 """
745 # find the root of the repo 745 # find the root of the repo
746 repodir = self.vcs.splitPath(name)[0] 746 repodir = self.vcs.splitPath(name)[0]
747 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 747 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
748 repodir = os.path.dirname(repodir) 748 repodir = os.path.dirname(repodir)
749 if repodir == os.sep: 749 if os.path.splitdrive(repodir)[1] == os.sep:
750 return 750 return
751 751
752 if isCreate: 752 if isCreate:
753 title = self.trUtf8("Create New Queue") 753 title = self.trUtf8("Create New Queue")
754 else: 754 else:
810 """ 810 """
811 # find the root of the repo 811 # find the root of the repo
812 repodir = self.vcs.splitPath(name)[0] 812 repodir = self.vcs.splitPath(name)[0]
813 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 813 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
814 repodir = os.path.dirname(repodir) 814 repodir = os.path.dirname(repodir)
815 if repodir == os.sep: 815 if os.path.splitdrive(repodir)[1] == os.sep:
816 return 816 return
817 817
818 if operation == Queues.QUEUE_PURGE: 818 if operation == Queues.QUEUE_PURGE:
819 title = self.trUtf8("Purge Queue") 819 title = self.trUtf8("Purge Queue")
820 elif operation == Queues.QUEUE_DELETE: 820 elif operation == Queues.QUEUE_DELETE:
879 """ 879 """
880 # find the root of the repo 880 # find the root of the repo
881 repodir = self.vcs.splitPath(name)[0] 881 repodir = self.vcs.splitPath(name)[0]
882 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): 882 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
883 repodir = os.path.dirname(repodir) 883 repodir = os.path.dirname(repodir)
884 if repodir == os.sep: 884 if os.path.splitdrive(repodir)[1] == os.sep:
885 return 885 return
886 886
887 self.queuesListQueuesDialog = HgQueuesQueueManagementDialog( 887 self.queuesListQueuesDialog = HgQueuesQueueManagementDialog(
888 HgQueuesQueueManagementDialog.NO_INPUT, 888 HgQueuesQueueManagementDialog.NO_INPUT,
889 self.trUtf8("Available Queues"), 889 self.trUtf8("Available Queues"),

eric ide

mercurial