[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Bug 2468: non-recursive status

From: Erik Scrafford <erik_at_scrafford.org>
Date: 2005-12-28 22:39:10 CET

http://subversion.tigris.org/issues/show_bug.cgi?id=2468

I just ran into this bug yesterday too. I worked around this problem
in my code by doing the follow:

chdir to the directory you want to status
pass "" for the directory, and add path to your baton(I'm using
NSDictionary) for svn_client_status2
in the callback from svn_client_status2, concatenate the dir from the
baton and the passed dir together
chdir back to where you started

It only appears to happen to working copies where it's parent
directory is also a working copy (which is almost all the time). If
you move the same directory outside of it's parent working directory
(/tmp, for instance), it works as expected. Here's an updated repro
script that I copied from the bug:

###############################################

#!/bin/sh

    SVN=/usr/local/bin/svn
    SVNADMIN=/usr/local/bin/svnadmin

    rm -rf 2468
    mkdir 2468
    cd 2468

    # URL=http://localhost/SOMETHING/repos
    # URL=svn://localhost/SOMETHING/repos
    URL=file:///`pwd`/repos

    rm -rf repos wc wc-other

    ${SVNADMIN} create repos
    ${SVN} co -q ${URL}/ wc
    ${SVN} co -q ${URL}/ wc-other

    cd wc-other
    mkdir folder
    echo "A new file." > folder/file.txt
    ${SVN} add -q folder
    ${SVN} ci -q -m "Add folder and folder/file.txt in r1."

    cd ../wc
    ${SVN} up -q

    cd ../wc-other
    echo "A modification to folder/file.txt." >> folder/file.txt
    ${SVN} ci -q -m "Modify file.txt in r2."

    cd ../wc

    echo "Attempting to reproduce bug with:"
    ${SVN} -q --version
    echo ""

    echo "-----------------------------------------------"
    echo "Running 'svn status -u folder' from top of wc:"
    echo ""
    ${SVN} st -u folder
    echo ""

    echo "-----------------------------------------------"
    echo " *** THIS ONE IS BROKEN *** "
    echo "Running 'svn status -uN folder' from top of wc:"
    echo ""
    ${SVN} st -uN folder
    echo ""

    cd folder

    echo "-----------------------------------------------"
    echo "Running 'svn status -u' from inside wc/folder:"
    echo ""
    ${SVN} st -u
    echo ""

    echo "-----------------------------------------------"
    echo ""
    echo "Running 'svn status -uN' from inside wc/folder:"
    ${SVN} st -uN
    echo ""

    cd ../..

    mv wc/folder folder

    echo "-----------------------------------------------"
    echo "Running 'svn status -u folder' after moving it outside of wc:"
    echo ""
    ${SVN} st -u folder

    echo "-----------------------------------------------"
    echo "Running 'svn status -uN folder' after moving it outside of
wc:"
    echo ""
    ${SVN} st -uN folder

###############################################

And the output of the script:

###############################################

Attempting to reproduce bug with:
1.2.3

-----------------------------------------------
Running 'svn status -u folder' from top of wc:

        * 1 folder/file.txt
Status against revision: 2

-----------------------------------------------
*** THIS ONE IS BROKEN ***
Running 'svn status -uN folder' from top of wc:

Status against revision: 2

-----------------------------------------------
Running 'svn status -u' from inside wc/folder:

        * 1 file.txt
Status against revision: 2

-----------------------------------------------

Running 'svn status -uN' from inside wc/folder:
        * 1 file.txt
Status against revision: 2

-----------------------------------------------
Running 'svn status -u folder' after moving it outside of wc:

        * 1 folder/file.txt
Status against revision: 2
-----------------------------------------------
Running 'svn status -uN folder' after moving it outside of wc:

        * 1 folder/file.txt
Status against revision: 2

#############################################

erik

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 28 22:40:28 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.