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

Removed dir in repos with local modifications result in strange behavior.

From: Josef Wolf <jw_at_raven.inka.de>
Date: 2004-03-06 23:09:30 CET

Hello!

Today, I experienced a strange behavior. Maybe some kind of soul could
check whether this is a bug or maybe it was my mistake.

I had two WCs of a (production) repos. In the first WC, I made local
modifications to a file named server/config/boot.txt, but I have not
commited them bacause I was not sure about the change. Some days later
I decided to _completely_ get rid of this server subdirectory. So I
issued a "svn rm server" from the second WC, which I committed.

Then I came back to the first WC (the one with local mod's in a file
which parent directories were already removed in the repos). Here is a
(commented) capture of what happened:

    jw@raven:~/sandbox/misc> svn up
    U notice
    subversion/libsvn_wc/update_editor.c:780: (apr_err=155000)
    svn: Won't delete locally modified directory ''
    subversion/libsvn_wc/adm_ops.c:1669: (apr_err=155012)
    svn: File 'boot.txt' has local modifications

OK, I forgot about the local modifications and it is a good thing that
svn reminds me. But how come that the locally modified directory don't
have a name?

    jw@raven:~/sandbox/misc> svn diff
    Index: server/config/boot.txt
    ===================================================================
    --- server/config/boot.txt (revision 38)
    +++ server/config/boot.txt (working copy)
    @@ -110,7 +110,7 @@
    [ contents deleted ]

Well, the diff contained exactly what I expected. I don't need the whole
directory anymore. So my plan is to revert the changes and "svn up" to
get rid of the directory. So let's revert:
    
    jw@raven:~/sandbox/misc> svn revert server/config/boot.txt
    Reverted 'server/config/boot.txt'

This was the only modification. So "svn up" should work now. But:

    jw@raven:~/sandbox/misc> svn up
    subversion/libsvn_wc/update_editor.c:780: (apr_err=155000)
    svn: Won't delete locally modified directory ''
    subversion/libsvn_wc/adm_ops.c:1878: (apr_err=155012)
    svn: Left locally modified or unversioned files
    jw@raven:~/sandbox/misc> svn st
    ! .
    M BUILD
    ? server/config
    ! server

Note that the server/config directory has a question mark as if it was never
under svn control. But this just _can't_ be true because I just reverted
a change in a file from this directory. Now I tried to revert the whole
directory:

    jw@raven:~/sandbox/misc> svn revert server/
    jw@raven:~/sandbox/misc> svn st
    ! .
    M BUILD
    ? server/config
    ! server

Ough! Still not enough? So revert the _current_ dir. (note that I should
loose local modifications to the BUILD file here):

    jw@raven:~/sandbox/misc> svn revert .
    jw@raven:~/sandbox/misc> svn st
    ! .
    M BUILD
    ? server/config
    ! server

Ough?? BUILD is still modified? And the directory is still in a strange
state? OK, try recursive.

    jw@raven:~/sandbox/misc> svn -R revert .
    jw@raven:~/sandbox/misc> svn st
    ! .
    M BUILD
    ? server/config
    ! server

WTF? Nothing changed?!?

    jw@raven:~/sandbox/misc> svn up
    subversion/libsvn_wc/update_editor.c:780: (apr_err=155000)
    svn: Won't delete locally modified directory ''
    subversion/libsvn_wc/adm_ops.c:1878: (apr_err=155012)
    svn: Left locally modified or unversioned files

Not that I really expected that this would help...

    jw@raven:~/sandbox/misc> svn up .
    At revision 39.

But _this_ makes me really curious... How come "svn up ." be _that_
different from "svn up" without the dot? And why does it revert the
changes "svn -R revert ." was not able to revert?

    jw@raven:~/sandbox/misc> svn up
    At revision 39.
    jw@raven:~/sandbox/misc> svn st
    jw@raven:~/sandbox/misc>

At last...
This is what I would have expected after the first "svn revert".

PS: Thanks to all contributors. Subversion is a _great_ piece of software!

-- 
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 6 23:10:23 2004

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.