##// 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:

r1527:c13fce71 default
r1564:34579a67 default
Show More
test-symlinks
42 lines | 917 B | text/plain | TextLexer
#!/bin/sh
#Test bug regarding symlinks that showed up in hg 0.7
#Author: Matthew Elder <sseses@gmail.com>
#make and initialize repo
hg init test; cd test;
#make a file and a symlink
touch foo; ln -s foo bar;
#import with addremove -- symlink walking should _not_ screwup.
hg addremove
#commit -- the symlink should _not_ appear added to dir state
hg commit -m 'initial'
#add a new file so hg will let me commit again
touch bomb
#again, symlink should _not_ show up on dir state
hg addremove
#Assert screamed here before, should go by without consequence
hg commit -m 'is there a bug?'
cd .. ; rm -rf test
hg init test; cd test;
mkdir dir
touch a.c dir/a.o dir/b.o
# test what happens if we want to trick hg
hg commit -A -m 0
echo "relglob:*.o" > .hgignore
rm a.c
rm dir/a.o
rm dir/b.o
mkdir dir/a.o
ln -sf nonexist dir/b.o
mkfifo a.c
# it should show a.c, dir/a.o and dir/b.o removed
hg status
hg status a.c