If you have a directory that is to be replaced with a symlink, and that directory has an excluded item in it, fsdiff doesn't create a line for lapply to remove the file. This patch fixes that behavior.
To reproduce the bug, I've created a command file and transcript that illustrate the problem.
command.K:
p test.T
x ./foo/baz
test.T:
l ./foo ./bar
On the filesystem, I have this:
[suntzu:/tmp] slauncha% ls -l ./foo
-rw-r--r-- 1 slauncha wheel 0 Feb 18 10:49 baz
-rw-r--r-- 1 slauncha wheel 0 Feb 18 10:49 something
Running fsdiff results in the following:
[suntzu:/tmp] slauncha% fsdiff -A -I ./foo
test.T:
l ./foo 0777 0 0 ./bar
- f ./foo/something 0644 183575 0 1266508195 0 -
As you can see, since ./foo/baz matches the exclude, it isn't printed. Running lapply results in this:
[suntzu:/tmp] slauncha% fsdiff -A -I ./foo > ./diff.T
[suntzu:/tmp] slauncha% lapply -FI ./diff.T
Password:
./foo/something: deleted
./foo: Directory not empty
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've uploaded a third patch that fixes a bug (bad parentheses) in the second. This was causing fsdiff to generate extra transcript lines unnecessarily.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Fixes bug 1985781.
To reproduce the bug, I've created a command file and transcript that illustrate the problem.
command.K:
p test.T
x ./foo/baz
test.T:
l ./foo ./bar
On the filesystem, I have this:
[suntzu:/tmp] slauncha% ls -l ./foo
-rw-r--r-- 1 slauncha wheel 0 Feb 18 10:49 baz
-rw-r--r-- 1 slauncha wheel 0 Feb 18 10:49 something
Running fsdiff results in the following:
[suntzu:/tmp] slauncha% fsdiff -A -I ./foo
test.T:
l ./foo 0777 0 0 ./bar
- f ./foo/something 0644 183575 0 1266508195 0 -
As you can see, since ./foo/baz matches the exclude, it isn't printed. Running lapply results in this:
[suntzu:/tmp] slauncha% fsdiff -A -I ./foo > ./diff.T
[suntzu:/tmp] slauncha% lapply -FI ./diff.T
Password:
./foo/something: deleted
./foo: Directory not empty
I have uploaded a second version of the patch to address concerns with the first one.
A newer version of the patch, fixing a bug.
I've uploaded a third patch that fixes a bug (bad parentheses) in the second. This was causing fsdiff to generate extra transcript lines unnecessarily.
Testing fix.