changeset 185:db3aa85b9379

Add manifest hash to commit messages for easy signing -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Here's an example: This is the current manifest hash: e06d11165178d03c296ea7e7854f91e612a8d6bf It was copied from the HG: comment lines that are added to the commit. Then I wrote this commit message, signed it, then closed the commit. The manifest hash is a hash of all the files in the project together with the hashes of manifest's parents. Thus, signing the manifest hash allows us to verify the entire state of project at the time of the commit. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCmMrcywK+sNU5EO8RAoKwAJ4gPz2dI1Xh44N3tra43clUGhLVggCbBxuu 8pBZt85SA9ty39+e2+hL9WI= =t/xS -----END PGP SIGNATURE-----
author mpm@selenic.com
date Sat, 28 May 2005 11:48:00 -0800
parents 697f05bfe976
children 9a2075c0b9b8
files mercurial/hg.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Fri May 27 19:38:34 2005 -0800
+++ b/mercurial/hg.py	Sat May 28 11:48:00 2005 -0800
@@ -357,7 +357,8 @@
         new = new.keys()
         new.sort()
 
-        edittext = text + "\n"+"".join(["HG: changed %s\n" % f for f in new])
+        edittext = text + "\n" + "HG: manifest hash %s\n" % hex(mnode)
+        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)
 
@@ -768,6 +769,7 @@
         if co == cn: cn = -1
 
         edittext = "\nHG: merge resolve\n" + \
+                   "HG: manifest hash %s\n" % hex(mnode) + \
                    "".join(["HG: changed %s\n" % f for f in new])
         edittext = self.ui.edit(edittext)
         n = self.changelog.add(node, new, edittext, tr, co, cn)