##// END OF EJS Templates
Re: [PATCH 2 of 3] remove walk warning about nonexistent files...
Re: [PATCH 2 of 3] remove walk warning about nonexistent files On 11/15/05, Robin Farine <robin.farine@terminus.org> wrote: > # HG changeset patch > # User Robin Farine <robin.farine@terminus.org> > # Node ID ce0a3cc309a8d1e81278ec01a3c61fbb99c691f4 > # Parent feb77e0951e74d75c213e8471f107fdcc124c876 > remove walk warning about nonexistent files > > diff -r feb77e0951e7 -r ce0a3cc309a8 mercurial/dirstate.py > --- a/mercurial/dirstate.py Tue Nov 15 08:42:45 2005 +0100 > +++ b/mercurial/dirstate.py Tue Nov 15 08:59:50 2005 +0100 > @@ -336,9 +336,6 @@ > try: > st = os.lstat(f) > except OSError, inst: > - if ff not in dc: self.ui.warn('%s: %s\n' % ( > - util.pathto(self.getcwd(), ff), > - inst.strerror)) > continue > if stat.S_ISDIR(st.st_mode): > cmp1 = (lambda x, y: cmp(x[1], y[1])) this break some tests, a better fix would be to check if ff can be a directory prefix from files in dc you can try the attached patch. Benoit

File last commit:

r1413:1c64c628 default
r1564:34579a67 default
Show More
test-walk
55 lines | 1.1 KiB | text/plain | TextLexer
Bryan O'Sullivan
Add unit tests for walk code.
r889 #!/bin/sh
mkdir t
cd t
hg init
mkdir -p beans
for b in kidney navy turtle borlotti black pinto; do
echo $b > beans/$b
done
mkdir -p mammals/Procyonidae
for m in cacomistle coatimundi raccoon; do
echo $m > mammals/Procyonidae/$m
done
echo skunk > mammals/skunk
echo fennel > fennel
echo fenugreek > fenugreek
echo fiddlehead > fiddlehead
echo glob:glob > glob:glob
hg addremove
hg commit -m "commit #0" -d "0 0"
hg debugwalk
cd mammals
hg debugwalk
hg debugwalk Procyonidae
cd Procyonidae
hg debugwalk
hg debugwalk ..
cd ..
hg debugwalk ../beans
hg debugwalk
cd ..
hg debugwalk -Ibeans
Benoit Boissinot
Do not use 'glob' expansion by default on OS != 'nt'
r1413 hg debugwalk 'glob:mammals/../beans/b*'
Bryan O'Sullivan
Add unit tests for walk code.
r889 hg debugwalk '-X*/Procyonidae' mammals
hg debugwalk path:mammals
hg debugwalk ..
hg debugwalk beans/../..
Bryan O'Sullivan
Turn off testing of absolute paths for now....
r893 # Don't know how to test absolute paths without always getting a false
# error.
#hg debugwalk `pwd`/beans
#hg debugwalk `pwd`/..
Bryan O'Sullivan
Add unit tests for walk code.
r889 hg debugwalk glob:\*
hg debugwalk 're:.*[kb]$'
hg debugwalk path:beans/black
Benoit Boissinot
Do not use 'glob' expansion by default on OS != 'nt'
r1413 hg debugwalk beans 'glob:beans/*'
hg debugwalk 'glob:j*'
Bryan O'Sullivan
Add unit tests for walk code.
r889 hg debugwalk NOEXIST
mkfifo fifo
hg debugwalk fifo
rm fenugreek
hg debugwalk fenugreek
hg rm fenugreek
hg debugwalk fenugreek
touch new
hg debugwalk new