2629 else: |
2629 else: |
2630 res = False |
2630 res = False |
2631 |
2631 |
2632 return res |
2632 return res |
2633 |
2633 |
2634 def hgGraft(self, path): |
2634 def hgGraft(self, path, revs=None): |
2635 """ |
2635 """ |
2636 Public method to copy changesets from another branch. |
2636 Public method to copy changesets from another branch. |
2637 |
2637 |
2638 @param path directory name of the project (string) |
2638 @param path directory name of the project (string) |
|
2639 @param revs list of revisions to show in the revisions pane (list of strings) |
2639 @return flag indicating that the project should be reread (boolean) |
2640 @return flag indicating that the project should be reread (boolean) |
2640 """ |
2641 """ |
2641 # find the root of the repo |
2642 # find the root of the repo |
2642 repodir = self.splitPath(path)[0] |
2643 repodir = self.splitPath(path)[0] |
2643 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
2644 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
2645 if os.path.splitdrive(repodir)[1] == os.sep: |
2646 if os.path.splitdrive(repodir)[1] == os.sep: |
2646 return False |
2647 return False |
2647 |
2648 |
2648 from .HgGraftDialog import HgGraftDialog |
2649 from .HgGraftDialog import HgGraftDialog |
2649 res = False |
2650 res = False |
2650 dlg = HgGraftDialog(self) |
2651 dlg = HgGraftDialog(self, revs) |
2651 if dlg.exec_() == QDialog.Accepted: |
2652 if dlg.exec_() == QDialog.Accepted: |
2652 revs, (userData, currentUser, userName), \ |
2653 revs, (userData, currentUser, userName), \ |
2653 (dateData, currentDate, dateStr), log, dryrun = dlg.getData() |
2654 (dateData, currentDate, dateStr), log, dryrun = dlg.getData() |
2654 |
2655 |
2655 args = [] |
2656 args = [] |