2704 repodir = os.path.dirname(repodir) |
2704 repodir = os.path.dirname(repodir) |
2705 if os.path.splitdrive(repodir)[1] == os.sep: |
2705 if os.path.splitdrive(repodir)[1] == os.sep: |
2706 return False |
2706 return False |
2707 |
2707 |
2708 from .HgImportDialog import HgImportDialog |
2708 from .HgImportDialog import HgImportDialog |
2709 dlg = HgImportDialog() |
2709 dlg = HgImportDialog(self) |
2710 if dlg.exec_() == QDialog.Accepted: |
2710 if dlg.exec_() == QDialog.Accepted: |
2711 (patchFile, noCommit, message, date, user, stripCount, |
2711 (patchFile, noCommit, message, date, user, withSecret, stripCount, |
2712 force) = dlg.getParameters() |
2712 force) = dlg.getParameters() |
2713 |
2713 |
2714 args = self.initCommand("import") |
2714 args = self.initCommand("import") |
2715 args.append("--verbose") |
2715 args.append("--verbose") |
2716 if noCommit: |
2716 if noCommit: |
2728 if stripCount != 1: |
2728 if stripCount != 1: |
2729 args.append("--strip") |
2729 args.append("--strip") |
2730 args.append(str(stripCount)) |
2730 args.append(str(stripCount)) |
2731 if force: |
2731 if force: |
2732 args.append("--force") |
2732 args.append("--force") |
|
2733 if withSecret: |
|
2734 args.append("--secret") |
2733 args.append(patchFile) |
2735 args.append(patchFile) |
2734 |
2736 |
2735 dia = HgDialog(self.tr("Import Patch"), self) |
2737 dia = HgDialog(self.tr("Import Patch"), self) |
2736 res = dia.startProcess(args, repodir) |
2738 res = dia.startProcess(args, repodir) |
2737 if res: |
2739 if res: |