Mercurial > hg
changeset 288:97c87ac6d7a4
commit: edit text fixups
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
commit: edit text fixups
if given text, don't call editor
if editor returned only whitespace, abort
manifest hash: 7b6158a37568d91be1443b487d0a2cea1ba55dd3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCp4zXywK+sNU5EO8RAqCrAJ921nNgI/akM8oacXewkIYdxaoiAgCffOP5
UOIl4GzvkOkcqd5YFS83pa8=
=seZT
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Wed, 08 Jun 2005 16:27:03 -0800 |
parents | cd6a462ed1e1 |
children | 266396e32006 |
files | mercurial/hg.py |
diffstat | 1 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hg.py Wed Jun 08 16:15:07 2005 -0800 +++ b/mercurial/hg.py Wed Jun 08 16:27:03 2005 -0800 @@ -493,15 +493,16 @@ new = new.keys() new.sort() - edittext = text + "\n" + "HG: manifest hash %s\n" % hex(mn) - edittext += "".join(["HG: changed %s\n" % f for f in new]) - edittext += "".join(["HG: removed %s\n" % f for f in remove]) - edittext = self.ui.edit(edittext) + if not text: + edittext = "\n" + "HG: manifest hash %s\n" % hex(mn) + edittext += "".join(["HG: changed %s\n" % f for f in new]) + edittext += "".join(["HG: removed %s\n" % f for f in remove]) + edittext = self.ui.edit(edittext) + if not edittext.rstrip(): + return 1 + text = edittext - if not edittext: - return 1 - - n = self.changelog.add(mn, new, edittext, tr, p1, p2) + n = self.changelog.add(mn, new, text, tr, p1, p2) tr.close() self.dirstate.setparents(n)