Bug report
Eric Firing
efiring at hawaii.edu
Thu Jan 5 17:19:00 UTC 2006
Bryan O'Sullivan wrote:
> On Tue, 2006-01-03 at 21:25 -1000, Eric Firing wrote:
>
>
>>Make a directory tree including symbolic links.
>
>
> That's likely to be your problem. Mercurial has been modified since 0.7
> to ignore symlinks, since it doesn't handle them safely.
>
> <b
>
Bryan,
The result is the same using the hg downloaded from the hg repo last
night. Using a copy of the same directory that I sent in my previous
message:
[efiring at manini slnew]$ \rm -r .hg
[efiring at manini slnew]$ hg init
[efiring at manini slnew]$ hg addremove
adding linklist
adding symlinker.py
adding symlinker.pyc
adding symlinker.py~
adding test/.linklist
adding test/OldHouse2.jpg
adding test/bad_link
removing test/bad_link
adding test/dir2/OldHouse2.jpg
adding test/dir2/kaiyo
adding test/dir2/regular2.txt
adding test/kaiyo
adding test/regular.txt
test/bad_link does not exist!
test/dir2/kaiyo not added: only files supported currently
test/kaiyo not added: only files supported currently
test/bad_link not tracked!
[efiring at manini slnew]$ ll test/dir2
total 0
lrwxrwxrwx 1 efiring efiring 14 Jan 5 06:58 kaiyo -> ../../../kaiyo/
lrwxrwxrwx 1 efiring efiring 27 Jan 5 06:58 OldHouse2.jpg ->
/home/efiring/OldHouse2.jpg
-rw-r--r-- 1 efiring efiring 0 Dec 30 12:53 regular2.txt
[efiring at manini slnew]$ hg status
A linklist
A symlinker.py
A symlinker.pyc
A symlinker.py~
A test/.linklist
A test/dir2/regular2.txt
A test/regular.txt
R test/OldHouse2.jpg
R test/dir2/OldHouse2.jpg
Note that at this stage, the genuine files are scheduled to be added,
but two of the symlinks are scheduled for deletion--in spite of never
having been added. The symlinks pointing nowhere or to directories are
ignored, but the two pointing to ordinary files that exist (on my
machine) are being handled inconsistently. The first commit works OK
(as before), and the manifest looks fine--no symlinks:
[efiring at manini slnew]$ hg commit
Zed V1.0.3 by Sandro Serafini (c) 1997/98
Loading /home/efiring/.zedxrc...
Reading /home/efiring/myzed.cfg...
Resuming /home/efiring/.zedxrc...
[efiring at manini slnew]$ hg log
changeset: 0:d72f2a2743cb
tag: tip
user: efiring at manini.soest.hawaii.edu
date: Thu Jan 5 07:10:37 2006 -1000
summary: Initial repo; test with devel version of hg.
[efiring at manini slnew]$ hg manifest
af965105d6e2e48856f78f164b64c88e4968093e 644 linklist
c3a7805af382c0afce1b79e26b65dce51a371bed 755 symlinker.py
3b143bf656265bc45d38397a8d958310699ca7cc 644 symlinker.pyc
c3a7805af382c0afce1b79e26b65dce51a371bed 755 symlinker.py~
5fcff10cd88d8477d87ee16fe6cc3b7a0109e283 644 test/.linklist
b80de5d138758541c5f05265ad144ab9fa86d1db 644 test/dir2/regular2.txt
b80de5d138758541c5f05265ad144ab9fa86d1db 644 test/regular.txt
Now try a second addremove and commit:
[efiring at manini slnew]$ hg addremove
adding test/OldHouse2.jpg
adding test/bad_link
removing test/bad_link
adding test/dir2/OldHouse2.jpg
adding test/dir2/kaiyo
adding test/kaiyo
test/bad_link does not exist!
test/dir2/kaiyo not added: only files supported currently
test/kaiyo not added: only files supported currently
test/bad_link not tracked!
[efiring at manini slnew]$ hg status
R test/OldHouse2.jpg
R test/dir2/OldHouse2.jpg
[efiring at manini slnew]$ hg commit
** unknown exception encountered, details follow
** report bug details to mercurial at selenic.com
Traceback (most recent call last):
File "/usr/bin/hg", line 13, in ?
commands.run()
File "/home/efiring/lib/python/mercurial/commands.py", line 2010, in run
sys.exit(dispatch(sys.argv[1:]))
File "/home/efiring/lib/python/mercurial/commands.py", line 2150, in
dispatch
return d()
File "/home/efiring/lib/python/mercurial/commands.py", line 2135, in
<lambda>
d = lambda: func(u, repo, *args, **cmdoptions)
File "/home/efiring/lib/python/mercurial/commands.py", line 702, in
commit
repo.commit(files, message, opts['user'], opts['date'], match)
File "/home/efiring/lib/python/mercurial/localrepo.py", line 404, in
commit
(new, remove))
File "/home/efiring/lib/python/mercurial/manifest.py", line 146, in add
raise AssertionError(
AssertionError: failed to remove test/OldHouse2.jpg from manifest
So, something is still wrong. I actually ran into this because I
decided to use hg to track changes in my /etc directory, and after a
Mandriva upgrade there were quite a few files added and deleted so I
used addremove to round them up. I then hit this error when I tried to
commit.
Eric
More information about the Mercurial
mailing list