Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 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 | 7f5c3fb0a37d |
children | 47a8ea1eb2c3 |
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)