Menu

#46 Fix for replacing dirs with symlinks

v1.X
open
UNIX (35)
5
2011-06-13
2010-01-29
Jeff Kelley
No

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.

Discussion

  • Jeff Kelley

    Jeff Kelley - 2010-01-29
     
  • Jeff Kelley

    Jeff Kelley - 2010-01-29

    Fixes bug 1985781.

     
  • Jeff Kelley

    Jeff Kelley - 2010-02-18

    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

     
  • Jeff Kelley

    Jeff Kelley - 2010-06-04
     
  • Jeff Kelley

    Jeff Kelley - 2010-06-04

    I have uploaded a second version of the patch to address concerns with the first one.

     
  • Jeff Kelley

    Jeff Kelley - 2010-06-15

    A newer version of the patch, fixing a bug.

     
  • Jeff Kelley

    Jeff Kelley - 2010-06-15

    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.

     
  • Andrew Mortensen

    • assigned_to: nobody --> fitterhappier
     
  • Andrew Mortensen

    Testing fix.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.