425 noDialog = self.__commitData["noDialog"] |
425 noDialog = self.__commitData["noDialog"] |
426 closeBranch = self.__commitData["closeBranch"] |
426 closeBranch = self.__commitData["closeBranch"] |
427 |
427 |
428 if self.__commitDialog is not None: |
428 if self.__commitDialog is not None: |
429 msg = self.__commitDialog.logMessage() |
429 msg = self.__commitDialog.logMessage() |
|
430 amend = self.__commitDialog.amend() |
430 self.__commitDialog.accepted.disconnect(self.__vcsCommit_Step2) |
431 self.__commitDialog.accepted.disconnect(self.__vcsCommit_Step2) |
431 self.__commitDialog = None |
432 self.__commitDialog = None |
432 |
433 else: |
433 if not msg: |
434 amend = False |
|
435 |
|
436 if not msg and not amend: |
434 msg = '***' |
437 msg = '***' |
435 |
438 |
436 args = [] |
439 args = [] |
437 args.append('commit') |
440 args.append('commit') |
438 self.addArguments(args, self.options['global']) |
441 self.addArguments(args, self.options['global']) |
439 self.addArguments(args, self.options['commit']) |
442 self.addArguments(args, self.options['commit']) |
440 args.append("-v") |
443 args.append("-v") |
441 if closeBranch: |
444 if closeBranch: |
442 args.append("--close-branch") |
445 args.append("--close-branch") |
443 args.append("--message") |
446 if amend: |
444 args.append(msg) |
447 args.append("--amend") |
|
448 if msg: |
|
449 args.append("--message") |
|
450 args.append(msg) |
445 if isinstance(name, list): |
451 if isinstance(name, list): |
446 dname, fnames = self.splitPathList(name) |
452 dname, fnames = self.splitPathList(name) |
447 else: |
453 else: |
448 dname, fname = self.splitPath(name) |
454 dname, fname = self.splitPath(name) |
449 |
455 |
1268 """</table></p>\n""" |
1274 """</table></p>\n""" |
1269 """{2}""" |
1275 """{2}""" |
1270 ).format(self.versionStr, url, "\n".join(info)) |
1276 ).format(self.versionStr, url, "\n".join(info)) |
1271 |
1277 |
1272 ############################################################################ |
1278 ############################################################################ |
1273 ## Private Subversion specific methods are below. |
1279 ## Private Mercurial specific methods are below. |
1274 ############################################################################ |
1280 ############################################################################ |
1275 |
1281 |
1276 def __hgURL(self, url): |
1282 def __hgURL(self, url): |
1277 """ |
1283 """ |
1278 Private method to format a url for Mercurial. |
1284 Private method to format a url for Mercurial. |
1279 |
1285 |
1280 @param url unformatted url string (string) |
1286 @param url unformatted url string (string) |
1281 @return properly formated url for subversion (string) |
1287 @return properly formated url for mercurial (string) |
1282 """ |
1288 """ |
1283 url = self.hgNormalizeURL(url) |
1289 url = self.hgNormalizeURL(url) |
1284 url = url.split(':', 2) |
1290 url = url.split(':', 2) |
1285 if len(url) == 4: |
1291 if len(url) == 4: |
1286 scheme = url[0] |
1292 scheme = url[0] |
1305 def hgNormalizeURL(self, url): |
1311 def hgNormalizeURL(self, url): |
1306 """ |
1312 """ |
1307 Public method to normalize a url for Mercurial. |
1313 Public method to normalize a url for Mercurial. |
1308 |
1314 |
1309 @param url url string (string) |
1315 @param url url string (string) |
1310 @return properly normalized url for subversion (string) |
1316 @return properly normalized url for mercurial (string) |
1311 """ |
1317 """ |
1312 url = url.replace('\\', '/') |
1318 url = url.replace('\\', '/') |
1313 if url.endswith('/'): |
1319 if url.endswith('/'): |
1314 url = url[:-1] |
1320 url = url[:-1] |
1315 urll = url.split('//') |
1321 urll = url.split('//') |
1319 """ |
1325 """ |
1320 Public method used to copy a file/directory. |
1326 Public method used to copy a file/directory. |
1321 |
1327 |
1322 @param name file/directory name to be copied (string) |
1328 @param name file/directory name to be copied (string) |
1323 @param project reference to the project object |
1329 @param project reference to the project object |
1324 @return flag indicating successfull operation (boolean) |
1330 @return flag indicating successful operation (boolean) |
1325 """ |
1331 """ |
1326 dlg = HgCopyDialog(name) |
1332 dlg = HgCopyDialog(name) |
1327 res = False |
1333 res = False |
1328 if dlg.exec_() == QDialog.Accepted: |
1334 if dlg.exec_() == QDialog.Accepted: |
1329 target, force = dlg.getData() |
1335 target, force = dlg.getData() |