[PATCH 3/7] hgeditor: Simplify manifest hash adding
Radoslaw AstralStorm Szkodzinski
astralstorm at gorzow.mm.pl
Fri Jul 8 12:17:44 UTC 2005
# HG changeset patch
# User Radoslaw "AstralStorm" Szkodzinski <astralstorm at gorzow.mm.pl>
# Node ID be12687d4bf0ce16c4207bef85c188de66efbf53
# Parent 341d27f865903223f8bf12382e3596167228a1c1
hgeditor: Simplify manifest hash adding
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hgeditor: Simplify manifest hash adding
I hope no one will miss the colon.
Changeset summary:
hgeditor | 8 5 + 3 -
1 files changed, 5 insertions(+), 3 deletions(-)
manifest hash b16aea3cac53b3d4128c7f09b1c1771036254eb3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1-ecc0.1.6 (GNU/Linux)
iD8DBQFCzmwKlUMEU9HxC6IRAsEhAKCIUOaTCVqFYq0R+doy3kkVOeMI+gCfU/3i
paa5C5opGfphYc/jsGUZwvA=
=AaZG
-----END PGP SIGNATURE-----
diff -r 341d27f86590 -r be12687d4bf0 hgeditor
--- a/hgeditor Fri Jul 8 12:03:46 2005
+++ b/hgeditor Fri Jul 8 12:05:30 2005
@@ -23,10 +23,12 @@
exec $EDITOR "$1"
else
T1=`mktemp`; T2=`mktemp`
- MANIFEST=`grep '^HG: manifest hash' "$1" | cut -b 19-`
- echo -e "\n\nmanifest hash: $MANIFEST" >> "$T1"
- grep -vE '^(HG: manifest hash .*)?$' "$1" >> "$T1"
+ # Add manifest hash in order to sign whole repository state.
+ # Remove HG: prefix, as we want that to be stored.
+ grep '^HG: manifest hash' "$1" | cut -b 5- >> "$T1"
+ # Add all other state information
+ grep -v '^HG: manifest hash' "$1" >> "$T1"
(
cd "`hg root`"
grep '^HG: changed' "$1" | cut -b 13- | while read changed; do
More information about the Mercurial
mailing list