[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] [BUG] my-revision-library broken
From: |
Aaron Bentley |
Subject: |
Re: [Gnu-arch-users] [BUG] my-revision-library broken |
Date: |
Tue, 28 Sep 2004 12:18:58 -0400 |
User-agent: |
Mozilla Thunderbird 0.5 (X11/20040309) |
Johannes Berg wrote:
$ tla/tla/tla my-revision-library -d /scratch/tla-library
Error during call to `vu_chdir' for /scratch/tla-library (No such file or
directory)
PANIC: I/O error
Yeh, the directory doesn't exist any more, I renamed it :-)
I tried to patch this issue but don't quite understand the code path and
thus my patch didn't work.
It looks like you're stumbling over this:
181: dir = directory_as_cwd (argv[1]);
When adding revision libraries, it's important to canonicalize the
directory name. Otherwise, you can wind up with two copies of the same
library, and things just get ugly. With the current code, the following
are equivalent:
"tla my-revision-library ~/foo"
"tla my-revision-library ~//foo"
"cd; my-revision-library foo"
"cd ~/foo; my-revision-library ."
IMHO, this is as it should be.
Furthermore, it doesn't make sense to add a revision library that
doesn't exist. Yet it certainly makes sense to remove one that doesn't
exist.
So, I think the appropriate code is:
if (dir_exists (dir))
dir = canonicalize (dir);
else if (operation == add)
printf ("Can't add revlib; dir does not exist\n%s: ", dir);
exit (2);
Does that help?
Could someone else please look at it? Whoever
does can also remove the dir variable from
libarch/my.c:arch_set_my_library_path(), it is apparently unnecessary.
Huh? That function requires a dir to add/remove.
Aaron
--
Aaron Bentley
Director of Technology
Panometrics, Inc.
- [Gnu-arch-users] [BUG] my-revision-library broken, Johannes Berg, 2004/09/28
- Re: [Gnu-arch-users] [BUG] my-revision-library broken,
Aaron Bentley <=
- Re: [Gnu-arch-users] [BUG] my-revision-library broken, Johannes Berg, 2004/09/28
- Re: [Gnu-arch-users] [BUG] my-revision-library broken, Aaron Bentley, 2004/09/28
- Re: [Gnu-arch-users] [BUG] my-revision-library broken, Johannes Berg, 2004/09/28
- Re: [Gnu-arch-users] [MERGE REQUEST] my-revision-library broken (fails to remove non-existent paths), Johannes Berg, 2004/09/28
- Re: [Gnu-arch-users] [MERGE REQUEST] my-revision-library broken (fails to remove non-existent paths), Yann Droneaud, 2004/09/29
- Re: [Gnu-arch-users] [MERGE REQUEST] my-revision-library broken (fails to remove non-existent paths), Johannes Berg, 2004/09/29
Re: [Gnu-arch-users] [BUG] my-revision-library broken, Bug Goo, 2004/09/29