1862 Public method used to create a branch in the Mercurial repository. |
1862 Public method used to create a branch in the Mercurial repository. |
1863 """ |
1863 """ |
1864 from .HgBranchInputDialog import HgBranchInputDialog |
1864 from .HgBranchInputDialog import HgBranchInputDialog |
1865 dlg = HgBranchInputDialog(self.hgGetBranchesList()) |
1865 dlg = HgBranchInputDialog(self.hgGetBranchesList()) |
1866 if dlg.exec() == QDialog.DialogCode.Accepted: |
1866 if dlg.exec() == QDialog.DialogCode.Accepted: |
1867 name, commit = dlg.getData() |
1867 name, commit, force = dlg.getData() |
1868 name = name.strip().replace(" ", "_") |
1868 name = name.strip().replace(" ", "_") |
1869 args = self.initCommand("branch") |
1869 args = self.initCommand("branch") |
|
1870 if force: |
|
1871 args.append("--force") |
1870 args.append(name) |
1872 args.append(name) |
1871 |
1873 |
1872 dia = HgDialog( |
1874 dia = HgDialog( |
1873 self.tr('Creating branch in the Mercurial repository'), |
1875 self.tr('Creating branch in the Mercurial repository'), |
1874 self) |
1876 self) |