415 |
415 |
416 if not noDialog: |
416 if not noDialog: |
417 # call CommitDialog and get message from there |
417 # call CommitDialog and get message from there |
418 if self.__commitDialog is None: |
418 if self.__commitDialog is None: |
419 from .HgCommitDialog import HgCommitDialog |
419 from .HgCommitDialog import HgCommitDialog |
420 self.__commitDialog = HgCommitDialog(self, msg, mq, merge, |
420 self.__commitDialog = HgCommitDialog(self, msg, mq, merge, |
421 self.__ui) |
421 self.__ui) |
422 self.__commitDialog.accepted.connect(self.__vcsCommit_Step2) |
422 self.__commitDialog.accepted.connect(self.__vcsCommit_Step2) |
423 self.__commitDialog.show() |
423 self.__commitDialog.show() |
424 self.__commitDialog.raise_() |
424 self.__commitDialog.raise_() |
425 self.__commitDialog.activateWindow() |
425 self.__commitDialog.activateWindow() |
3361 not line.strip().endswith("="): |
3361 not line.strip().endswith("="): |
3362 self.__defaultPushConfigured = True |
3362 self.__defaultPushConfigured = True |
3363 |
3363 |
3364 def canCommitMerge(self, name): |
3364 def canCommitMerge(self, name): |
3365 """ |
3365 """ |
3366 Public method to check if the working directory is uncommitted merge. |
3366 Public method to check, if the working directory is an uncommitted |
|
3367 merge. |
3367 |
3368 |
3368 @param name file/directory name (string) |
3369 @param name file/directory name |
3369 |
3370 @type str |
3370 @return flag indicating commit merge capability (boolean) |
3371 @return flag indicating commit merge capability |
|
3372 @rtype bool |
3371 """ |
3373 """ |
3372 dname, fname = self.splitPath(name) |
3374 dname, fname = self.splitPath(name) |
3373 |
3375 |
3374 # find the root of the repo |
3376 # find the root of the repo |
3375 repodir = dname |
3377 repodir = dname |
3376 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
3378 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
3377 repodir = os.path.dirname(repodir) |
3379 repodir = os.path.dirname(repodir) |
3378 if os.path.splitdrive(repodir)[1] == os.sep: |
3380 if os.path.splitdrive(repodir)[1] == os.sep: |
3379 return |
3381 return False |
3380 |
3382 |
3381 args = self.initCommand("identify") |
3383 args = self.initCommand("identify") |
3382 |
3384 |
3383 output = "" |
3385 output = "" |
3384 if self.__client is None: |
3386 if self.__client is None: |
3392 output = str(process.readAllStandardOutput(), |
3394 output = str(process.readAllStandardOutput(), |
3393 self.getEncoding(), 'replace') |
3395 self.getEncoding(), 'replace') |
3394 else: |
3396 else: |
3395 output, error = self.__client.runcommand(args) |
3397 output, error = self.__client.runcommand(args) |
3396 |
3398 |
3397 if output.count('+') == 2: |
3399 return output.count('+') == 2 |
3398 return True |
|
3399 else: |
|
3400 return False |
|
3401 |
3400 |
3402 def canPull(self): |
3401 def canPull(self): |
3403 """ |
3402 """ |
3404 Public method to check, if pull is possible. |
3403 Public method to check, if pull is possible. |
3405 |
3404 |