eric6/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/queues.py

changeset 7979
54b73174ab61
parent 7971
ff2971513d6d
child 8043
0acf98cd089a
child 8143
2c730d5fd177
equal deleted inserted replaced
7978:1e391f977124 7979:54b73174ab61
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the queues extension interface. 7 Module implementing the queues extension interface.
8 """ 8 """
9
10 import os
11 9
12 from PyQt5.QtWidgets import QDialog, QApplication, QInputDialog 10 from PyQt5.QtWidgets import QDialog, QApplication, QInputDialog
13 11
14 from E5Gui import E5MessageBox 12 from E5Gui import E5MessageBox
15 13
675 """ 673 """
676 Public method to initialize a new queue repository. 674 Public method to initialize a new queue repository.
677 675
678 @param name directory name (string) 676 @param name directory name (string)
679 """ 677 """
680 # find the root of the repo
681 repodir = self.vcs.splitPath(name)[0]
682 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
683 repodir = os.path.dirname(repodir)
684 if os.path.splitdrive(repodir)[1] == os.sep:
685 return
686
687 args = self.vcs.initCommand("init") 678 args = self.vcs.initCommand("init")
688 args.append('--mq') 679 args.append('--mq')
689 args.append(repodir) 680 args.append(self.vcs.getClient().getRepository())
690 # init is not possible with the command server 681 # init is not possible with the command server
691 dia = HgDialog( 682 dia = HgDialog(
692 self.tr('Initializing new queue repository'), self.vcs) 683 self.tr('Initializing new queue repository'), self.vcs)
693 res = dia.startProcess(args) 684 res = dia.startProcess(args)
694 if res: 685 if res:

eric ide

mercurial