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: |