Mercurial > hg-stable
changeset 5041:49059086c634
localrepository: allow rawcommit to commit with an empty message
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed, 01 Aug 2007 09:57:05 -0700 |
parents | 4f34d9b2568e |
children | bf444a9a9c23 58006f8b8275 8b1ee1f59b3c |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Wed Aug 01 10:42:42 2007 +0200 +++ b/mercurial/localrepo.py Wed Aug 01 09:57:05 2007 -0700 @@ -651,11 +651,11 @@ if p1 is None: p1, p2 = self.dirstate.parents() return self.commit(files=files, text=text, user=user, date=date, - p1=p1, p2=p2, extra=extra) + p1=p1, p2=p2, extra=extra, empty_ok=True) def commit(self, files=None, text="", user=None, date=None, match=util.always, force=False, force_editor=False, - p1=None, p2=None, extra={}): + p1=None, p2=None, extra={}, empty_ok=False): wlock = lock = tr = None try: commit = [] @@ -768,7 +768,7 @@ new.sort() user = user or self.ui.username() - if not text or force_editor: + if (not empty_ok and not text) or force_editor: edittext = [] if text: edittext.append(text)