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

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

From: Josef Wolf <jw_at_raven.inka.de>
Date: 2004-03-07 22:29:09 CET

On Sun, Mar 07, 2004 at 12:06:46AM +0000, Philip Martin wrote:
> Josef Wolf <jw@raven.inka.de> writes:
>
> > 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?
>
> It's a poor message, it means
> Won't delete locally modified sub-directory within directory '.'

But it don't say '.', it says ''. And I would have expected 'server'.

> > 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
>
> That's a different error, it doesn't mention a file. I think you have
> an unversioned file or directory somewhere under server/config.

If there is an unversioned file, I'd expect "svn st" to mention it?

> > 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.
>
> It is true, you ran "svn up" after the revert and it deleted
> server/config and made it unversioned.

If this were true, server/config should have been removed...

> > 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):
>
> No, revert is non-recursive by default (read the docs)

That's why I issued a "svn -R revert ." below. Read ahead.

> > 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?
>
> It's not "strange" it's incomplete (read the docs)

_What_ is incomplete? There was only _one_ local modification in this
directory. This modification was _reverted_. The repos says that the
directory has to die. I don't see what is incomplete here...

> > OK, try recursive.
> >
> > jw@raven:~/sandbox/misc> svn -R revert .
> > jw@raven:~/sandbox/misc> svn st
> > ! .
> > M BUILD
> > ? server/config
> > ! server
> >
> > WTF? Nothing changed?!?
>
> I cannot reproduce that, can you?

This is the capture from the KDE-konsole, so there should not be any typo
problems. I'll try to reproduce this.

> > 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
>
> You have an unversioned directory (server/config) in server.

That's strange. Usually "locally modified" has the semantics of an item
under version control with local modifications. This time "locally modified"
has the semantics of "unknown item". Are you sure that the error is really
about an unversioned item? How can one (simple-minded as me) deduce from the
above error message that there is an unversioned subdir in a versioned dir?

Hey, all I want is to get rid of this damn dir. Last time I got into this
situation I made a "rm -rf damndir". This was a big mistake. I had to
completely remove the WC. This time I tried to use only svn commands to
resolve the problem. Was not a big difference on the first glance...

> > Not that I really expected that this would help...
> >
> > jw@raven:~/sandbox/misc> svn up .
> > At revision 39.
>
> It's not the explicit "." that makes the difference it's the repeated
> updates.

Oh, I made three updates. They all did not help. Might be some sort of luck
that the fourth update (which was the first I tried with the dot) fixed the
problems...

> - update attempts to delete server/config but fails because
> server/config contains an unversioned item. server/config gets left
> as unversioned. The update fails.

Does this mean that an unversioned directory will block updates? You must be
kidding...

> I do think we should consider changing update: when a locally modified
> item is encountered during delete, update should unversion, warn, and
> continue. There should only be an error if the unversioned item left
> behind causes an obstruction to a later add.

I think you are on the wrong road here. it was absolutely correct for
(first) update to error out when it encontered the local modifications.
But it should have left the directory as it was before the update. This way
resolve would have a chance to clean things up.

The problem was that (first) update made some modifications to the WC
which prevented (second) update (which was issued after "svn revert")
to do its job properly.

-- 
-- 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 Sun Mar 7 22:30: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.