Mercurial > hg > mercurial-crew-with-dirclash
comparison hgeditor @ 3105:ef4e5d05bac4
Merge with mainline
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 17 Sep 2006 16:02:09 -0500 |
parents | d9b8d28c0b94 |
children | 7a7d4937272b |
comparison
equal
deleted
inserted
replaced
3104:e6818b0b8154 | 3105:ef4e5d05bac4 |
---|---|
39 done | 39 done |
40 ) | 40 ) |
41 | 41 |
42 cat "$1" > "$HGTMP/msg" | 42 cat "$1" > "$HGTMP/msg" |
43 | 43 |
44 CHECKSUM=`md5sum "$HGTMP/msg"` | 44 MD5=$(which md5sum 2>/dev/null) || \ |
45 MD5=$(which md5 2>/dev/null) | |
46 [ -x "${MD5}" ] && CHECKSUM=`${MD5} "$HGTMP/msg"` | |
45 if [ -s "$HGTMP/diff" ]; then | 47 if [ -s "$HGTMP/diff" ]; then |
46 $EDITOR "$HGTMP/msg" "$HGTMP/diff" || exit $? | 48 $EDITOR "$HGTMP/msg" "$HGTMP/diff" || exit $? |
47 else | 49 else |
48 $EDITOR "$HGTMP/msg" || exit $? | 50 $EDITOR "$HGTMP/msg" || exit $? |
49 fi | 51 fi |
50 echo "$CHECKSUM" | md5sum -c >/dev/null 2>&1 && exit 13 | 52 [ -x "${MD5}" ] && (echo "$CHECKSUM" | ${MD5} -c >/dev/null 2>&1 && exit 13) |
51 | 53 |
52 mv "$HGTMP/msg" "$1" | 54 mv "$HGTMP/msg" "$1" |
53 | 55 |
54 exit $? | 56 exit $? |