view move-if-change @ 40124:9031427edfa3

(vc-diff-internal, vc-coding-system-for-diff, vc-default-diff-tree): New functions. (vc-version-diff): Use them. As a result, coding systems are now set up properly for all sorts of diffs, and tree diffs can now also be done locally. (vc-diff): With a prefix argument, don't require that it's called from a buffer under version control.
author André Spiegel <spiegel@gnu.org>
date Sun, 21 Oct 2001 12:15:22 +0000
parents 354e0c45cedf
children 14a97ab281d5
line wrap: on
line source

#!/bin/sh
if
test -r $2
then
if
cmp $1 $2 > /dev/null
then
echo $2 is unchanged
rm -f $1
else
mv -f $1 $2
fi
else
mv -f $1 $2
fi