Mercurial > hg > mercurial-crew-with-dirclash
comparison hgeditor @ 683:104d2aee3b44
Revert hgeditor change to manifest bits
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Revert hgeditor change to manifest bits
I'd rather have a blank line at the top.
This code primarily exists to show possible methods of signing
changesets so I'm not very concerned about conciseness or performance.
I should probably have all the signing commented out or disabled by
default.
manifest hash: 764da8d65bdaf9b45c7e3efd6cd2b4ee70979417
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFC01sdywK+sNU5EO8RAr2BAJ9Uq0XberFrYyehvmoKgE8p/j0XFQCdFPJr
DPDMbKeBHwK/yMiileBFW8o=
=DvnD
-----END PGP SIGNATURE-----
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 11 Jul 2005 21:54:37 -0800 |
parents | d6723636c172 |
children | 4ccf3de52989 |
comparison
equal
deleted
inserted
replaced
682:d6723636c172 | 683:104d2aee3b44 |
---|---|
25 exec $EDITOR "$1" | 25 exec $EDITOR "$1" |
26 else | 26 else |
27 # Remove temporary files even if we get interrupted | 27 # Remove temporary files even if we get interrupted |
28 trap "cleanup_exit 255" TERM KILL INT QUIT ABRT | 28 trap "cleanup_exit 255" TERM KILL INT QUIT ABRT |
29 T1=`mktemp`; T2=`mktemp` | 29 T1=`mktemp`; T2=`mktemp` |
30 MANIFEST=`grep '^HG: manifest hash' "$1" | cut -b 19-` | |
30 | 31 |
31 # Add manifest hash in order to sign whole repository state. | 32 echo -e "\n\nmanifest hash: $MANIFEST" >> "$T1" |
32 # Remove HG: prefix, as we want that to be stored. | 33 grep -vE '^(HG: manifest hash .*)?$' "$1" >> "$T1" |
33 grep '^HG: manifest hash' "$1" | cut -b 5- >> "$T1" | |
34 # Add all other state information | |
35 grep -v '^HG: manifest hash' "$1" >> "$T1" | |
36 ( | 34 ( |
37 cd "`hg root`" | 35 cd "`hg root`" |
38 grep '^HG: changed' "$1" | cut -b 13- | while read changed; do | 36 grep '^HG: changed' "$1" | cut -b 13- | while read changed; do |
39 hg diff "$changed" >> "$T2" | 37 hg diff "$changed" >> "$T2" |
40 done | 38 done |