comparison hgeditor @ 664:e1fbc1982372

hgeditor: Simplify manifest hash adding # HG changeset patch # User Radoslaw "AstralStorm" Szkodzinski <astralstorm@gorzow.mm.pl> # Node ID be12687d4bf0ce16c4207bef85c188de66efbf53 # Parent 341d27f865903223f8bf12382e3596167228a1c1 hgeditor: Simplify manifest hash adding I hope no one will miss the colon.
author Radoslaw "AstralStorm" Szkodzinski <astralstorm@gorzow.mm.pl>
date Sun, 10 Jul 2005 16:00:30 -0800
parents 562404de61fb
children 40fd5722c669
comparison
equal deleted inserted replaced
663:562404de61fb 664:e1fbc1982372
21 if grep -q "^HG: merge resolve" "$1" ; then 21 if grep -q "^HG: merge resolve" "$1" ; then
22 # we don't sign merges 22 # we don't sign merges
23 exec $EDITOR "$1" 23 exec $EDITOR "$1"
24 else 24 else
25 T1=`mktemp`; T2=`mktemp` 25 T1=`mktemp`; T2=`mktemp`
26 MANIFEST=`grep '^HG: manifest hash' "$1" | cut -b 19-`
27 26
28 echo -e "\n\nmanifest hash: $MANIFEST" >> "$T1" 27 # Add manifest hash in order to sign whole repository state.
29 grep -vE '^(HG: manifest hash .*)?$' "$1" >> "$T1" 28 # Remove HG: prefix, as we want that to be stored.
29 grep '^HG: manifest hash' "$1" | cut -b 5- >> "$T1"
30 # Add all other state information
31 grep -v '^HG: manifest hash' "$1" >> "$T1"
30 ( 32 (
31 cd "`hg root`" 33 cd "`hg root`"
32 grep '^HG: changed' "$1" | cut -b 13- | while read changed; do 34 grep '^HG: changed' "$1" | cut -b 13- | while read changed; do
33 hg diff "$changed" >> "$T2" 35 hg diff "$changed" >> "$T2"
34 done 36 done