2108 res = dia.startProcess(args, repodir) |
2108 res = dia.startProcess(args, repodir) |
2109 if res: |
2109 if res: |
2110 dia.exec_() |
2110 dia.exec_() |
2111 self.checkVCSStatus() |
2111 self.checkVCSStatus() |
2112 |
2112 |
|
2113 def hgCancelMerge(self, name): |
|
2114 """ |
|
2115 Public method to cancel an uncommitted merge. |
|
2116 |
|
2117 @param name file/directory name (string) |
|
2118 @return flag indicating, that the cancellation contained an add |
|
2119 or delete (boolean) |
|
2120 """ |
|
2121 dname, fname = self.splitPath(name) |
|
2122 |
|
2123 # find the root of the repo |
|
2124 repodir = dname |
|
2125 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
|
2126 repodir = os.path.dirname(repodir) |
|
2127 if os.path.splitdrive(repodir)[1] == os.sep: |
|
2128 return |
|
2129 |
|
2130 args = self.initCommand("update") |
|
2131 args.append("--clean") |
|
2132 |
|
2133 dia = HgDialog( |
|
2134 self.tr('Cancelling uncommitted merge'), |
|
2135 self) |
|
2136 res = dia.startProcess(args, repodir, False) |
|
2137 if res: |
|
2138 dia.exec_() |
|
2139 res = dia.hasAddOrDelete() |
|
2140 self.checkVCSStatus() |
|
2141 return res |
|
2142 |
2113 def hgBranch(self, name): |
2143 def hgBranch(self, name): |
2114 """ |
2144 """ |
2115 Public method used to create a branch in the Mercurial repository. |
2145 Public method used to create a branch in the Mercurial repository. |
2116 |
2146 |
2117 @param name file/directory name to be branched (string) |
2147 @param name file/directory name to be branched (string) |