eric7/Plugins/VcsPlugins/vcsGit/git.py

branch
eric7
changeset 8624
5192a2592324
parent 8621
8c9f41115c04
child 8653
43d556326ded
equal deleted inserted replaced
8623:fced5aa98d41 8624:5192a2592324
488 res = dia.startProcess(args, dname) 488 res = dia.startProcess(args, dname)
489 if res: 489 if res:
490 dia.exec() 490 dia.exec()
491 self.committed.emit() 491 self.committed.emit()
492 self.checkVCSStatus() 492 self.checkVCSStatus()
493
494 def vcsCommitMessages(self):
495 """
496 Public method to get the list of saved commit messages.
497
498 @return list of saved commit messages
499 @rtype list of str
500 """
501 # try per project commit history first
502 messages = self._vcsProjectCommitMessages()
503 if not messages:
504 # empty list returned, try the vcs specific one
505 messages = self.getPlugin().getPreferences('Commits')
506
507 return messages
508
509 def vcsAddCommitMessage(self, message):
510 """
511 Public method to add a commit message to the list of saved messages.
512
513 @param message message to be added
514 @type str
515 """
516 if not self._vcsAddProjectCommitMessage(message):
517 commitMessages = self.vcsCommitMessages()
518 if message in commitMessages:
519 commitMessages.remove(message)
520 commitMessages.insert(0, message)
521 no = Preferences.getVCS("CommitMessages")
522 del commitMessages[no:]
523 self.getPlugin().setPreferences('Commits', commitMessages)
524
525 def vcsClearCommitMessages(self):
526 """
527 Public method to clear the list of saved messages.
528 """
529 if not self._vcsClearProjectCommitMessages():
530 self.getPlugin().setPreferences('Commits', [])
493 531
494 def vcsUpdate(self, name, noDialog=False, revision=None): 532 def vcsUpdate(self, name, noDialog=False, revision=None):
495 """ 533 """
496 Public method used to update a file/directory with the Git 534 Public method used to update a file/directory with the Git
497 repository. 535 repository.

eric ide

mercurial