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