[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: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-03-07 01:06:46 CET

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 '.'

> 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.

> 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.

> 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)

> 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)

> 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?

> 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.

> 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.

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

- update doesn't attempt to delete server/config as it's unversioned,
  it fails to delete server because server/config is unversioned.
  server gets left behind as unversioned. The update fails.

- update doesn't attempt to delete server as it's unversioned. The
  update suceeds.

What fun!

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.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 7 01:07:01 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.