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

status ignores top-level prop changes in repository

From: Tom Karzes <tkarzes_at_pixelworks.com>
Date: 2006-11-14 22:18:24 CET

I'm using svn version 1.3.0 (r17949).

As far as I can tell, "svn status" will not tell you if the properties
on your current working directory are out-of-date with respect to the
repository when you do "svn status --show-updates .", even though it
will tell you if you've made a local change to the properties. However,
if it sees the parent directory, it will tell you. Presumably it needs
the information contained in the parent directory in order to make the
determination. This is a real problem, especially if you're looking at a
top-level directory. The only work-around I know of is to run "svn info"
on the repository (or to actually update your area and see if it changes).
This is quite painful and should not be unnecessary.

For instance, if your working copy has "foo" at the top-level, and "bar"
is beneath it (as a direct child of "foo", and not an externals def),
then if you're in "foo" and do "svn status --show-updates", and if both
"foo" and "bar" have property changes, you'll see the "*" for "bar", but
not for "foo". If you cd to "bar" and do it again, without giving it a
path argument that includes "foo", then the "*" will disappear from "bar"
as well.

Here is a complete example:

Create foo and foo/bar, and import it into the repository:

    % mkdir foo foo/bar
    % svn import -m xxx foo file:///home/tkarzes/svntest/repos/xyz
    Adding foo/bar

    Committed revision 82.
    %

Check it out as as both foo2 and foo3:

    % svn co file:///home/tkarzes/svntest/repos/xyz foo2
    A foo2/bar
    Checked out revision 82.
    % svn co file:///home/tkarzes/svntest/repos/xyz foo3
    A foo3/bar
    Checked out revision 82.
    %

Set properties on foo2 and foo2/bar, and commit:

    % svn propset prop1 abc foo2
    property 'prop1' set on 'foo2'
    % svn propset prop2 def foo2/bar
    property 'prop2' set on 'foo2/bar'
    % svn commit -m xxx foo2
    Sending foo2
    Sending foo2/bar

    Committed revision 83.
    %

At this point, both foo3 and foo3/bar are out of date. However,
"svn status --show-updates" only shows foo3/bar as being out of
date, and even that fails if you cd to foo3/bar:

    % svn status --show-updates --verbose foo3
           * 82 82 tkarzes foo3/bar
                   82 82 tkarzes foo3
    Status against revision: 83
    % cd foo3
    % svn status --show-updates --verbose .
           * 82 82 tkarzes bar
                   82 82 tkarzes .
    Status against revision: 83
    % cd bar
    % svn status --show-updates --verbose .
                   82 82 tkarzes .
    Status against revision: 83
    %

But, if you give it a little more context, it will figure it out:

    % svn status --show-updates --verbose ./../.
           * 82 82 tkarzes ../bar
                   82 82 tkarzes ..
    Status against revision: 83
    %

Unfortunately, this trick only works for bar, because the
parent directory apparently contains the information it needs.
This trick doesn't work for the parent directory, foo3. There is
no way to see that it's out of date. Yet, clearly it is, as can
be seen with an update:

    % cd ..
    % svn update .
     U bar
     U .
    Updated to revision 83.
    % svn status --show-updates --verbose .
                   83 83 tkarzes bar
                   83 83 tkarzes .
    Status against revision: 83
    %

Notice that it now recognizes that the last committed change to
both foo and bar was 83.

Tom Karzes
tkarzes@pixelworks.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 15 22:55:59 2006

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.