2737 dia.exec_() |
2737 dia.exec_() |
2738 res = dia.hasAddOrDelete() |
2738 res = dia.hasAddOrDelete() |
2739 self.checkVCSStatus() |
2739 self.checkVCSStatus() |
2740 return res |
2740 return res |
2741 |
2741 |
|
2742 def hgArchive(self): |
|
2743 """ |
|
2744 Public method to create an unversioned archive from the repository. |
|
2745 """ |
|
2746 # find the root of the repo |
|
2747 repodir = self.__projectHelper.getProject().getProjectPath() |
|
2748 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
|
2749 repodir = os.path.dirname(repodir) |
|
2750 if os.path.splitdrive(repodir)[1] == os.sep: |
|
2751 return |
|
2752 |
|
2753 from .HgArchiveDialog import HgArchiveDialog |
|
2754 dlg = HgArchiveDialog(self) |
|
2755 if dlg.exec_() == QDialog.Accepted: |
|
2756 archive, type_, prefix, subrepos = dlg.getData() |
|
2757 |
|
2758 args = [] |
|
2759 args.append("archive") |
|
2760 if type_: |
|
2761 args.append("--type") |
|
2762 args.append(type_) |
|
2763 if prefix: |
|
2764 args.append("--prefix") |
|
2765 args.append(prefix) |
|
2766 if subrepos: |
|
2767 args.append("--subrepos") |
|
2768 args.append(archive) |
|
2769 |
|
2770 dia = HgDialog(self.trUtf8("Create Unversioned Archive"), self) |
|
2771 res = dia.startProcess(args, repodir) |
|
2772 if res: |
|
2773 dia.exec_() |
|
2774 |
2742 ############################################################################ |
2775 ############################################################################ |
2743 ## Methods to deal with subrepositories are below. |
2776 ## Methods to deal with subrepositories are below. |
2744 ############################################################################ |
2777 ############################################################################ |
2745 |
2778 |
2746 def getHgSubPath(self): |
2779 def getHgSubPath(self): |