equal
deleted
inserted
replaced
797 if (not empty_ok and not text) or force_editor: |
797 if (not empty_ok and not text) or force_editor: |
798 edittext = [] |
798 edittext = [] |
799 if text: |
799 if text: |
800 edittext.append(text) |
800 edittext.append(text) |
801 edittext.append("") |
801 edittext.append("") |
|
802 edittext.append(_("HG: Please write and save a commit message")) |
|
803 edittext.append("HG: --") |
802 edittext.append("HG: user: %s" % user) |
804 edittext.append("HG: user: %s" % user) |
803 if p2 != nullid: |
805 if p2 != nullid: |
804 edittext.append("HG: branch merge") |
806 edittext.append("HG: branch merge") |
805 if branchname: |
807 if branchname: |
806 edittext.append("HG: branch %s" % util.tolocal(branchname)) |
808 edittext.append("HG: branch %s" % util.tolocal(branchname)) |
821 if use_dirstate: |
823 if use_dirstate: |
822 lines = [line.rstrip() for line in text.rstrip().splitlines()] |
824 lines = [line.rstrip() for line in text.rstrip().splitlines()] |
823 while lines and not lines[0]: |
825 while lines and not lines[0]: |
824 del lines[0] |
826 del lines[0] |
825 if not lines: |
827 if not lines: |
826 return None |
828 raise util.Abort(_("commit message cannot be left blank")) |
827 text = '\n'.join(lines) |
829 text = '\n'.join(lines) |
828 |
830 |
829 n = self.changelog.add(mn, changed + removed, text, trp, p1, p2, |
831 n = self.changelog.add(mn, changed + removed, text, trp, p1, p2, |
830 user, date, extra) |
832 user, date, extra) |
831 self.hook('pretxncommit', throw=True, node=hex(n), parent1=xp1, |
833 self.hook('pretxncommit', throw=True, node=hex(n), parent1=xp1, |