view tests/test-locate @ 1822:64df4220b349

copy/rename to a removed destination file When the destination of a copy or rename operation has been marked for removal, we need to restore it before we overwrite it with the new content. This also handles the case of idempotent renames, i.e. hg rename "a" "b" hg rename "b" "a"
author Robin Farine <robin.farine@terminus.org>
date Tue, 28 Feb 2006 23:47:40 -0800
parents 5e9168401a68
children 7544700fd931
line wrap: on
line source

#!/bin/sh
#
mkdir t
cd t
hg init
echo 0 > a
echo 0 > b
hg ci -A -m m -d "0 0"
touch nottracked
hg locate a
hg locate NONEXISTENT
hg locate
hg rm a
hg ci -m m -d "0 0"
hg locate a
hg locate NONEXISTENT
hg locate
hg locate -r 0 a
hg locate -r 0 NONEXISTENT
hg locate -r 0