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

WC in funny state after "svn switch"

From: Greg Ward <gward_at_python.net>
Date: 2004-09-30 04:11:04 CEST

Just tried my first experiment with creating a branch and now funny
things are happening in my working dir. Here's the scoop: I wrote some
code that I suspect is a dead end, but want to keep in case it's not.
It's just in one file, so I thought I'd branch just that one file:

$ svn cp mkpydoc file:///home/svn/optik/branches/mkpydoc-label-stack

(mkpydoc is the script with the probably-dead-end change.) I was
intending to create a directory with just this one file in it, but svn
did as it was told and copied just the file:

$ svn ls file:///home/svn/optik/branches/
iterator-branch/
mkpydoc-label-stack (no trailing slash, must be a file)
py152-backport-branch/

OK, no problem, it's a branch consisting of single file -- which is what
I wanted in the first place. "svn cat" revealed that the new branch
indeed contained my dead-end change, which wasn't exactly what I was
expecting -- but on reflection, svn is just doing what I told it to
(copy my working copy to a new branch).

Now here's where I started going wrong: somehow I thought that my
working copy must have been switched to the new branch, so I'd better
switch it back to the trunk. (I know, the logic is pretty thin, but
there you go.) Here's what I did (and what svn responded with until I
killed it):

$ svn switch file:///home/svn/optik/trunk mkpydoc
D mkpydoc
A mkpydoc
A mkpydoc/merge
A mkpydoc/test
A mkpydoc/test/test_optik.py
[...]
A mkpydoc/po/optik.fr.po
A mkpydoc/po/optik.de.po
svn: Caught signal

Oops! Looks like I got the syntax wrong for the "switch" command,
causing svn to clobber my working-copy mkpydoc (a file) with a directory
containing my whole trunk. Oops!

Aieee! At this point my reptilian hindbrain stepped in, and I
immediately reverted to the instinctive response of any CVS user:

$ rm -rf mkpydoc
$ svn up
svn: Can't open file 'mkpydoc/.svn/tmp/dir-props': No such file or directory

Hmmm. So, svn does not like it when my reptilian hindbrain comes up
with CVS-like behaviour. Maybe it's not too late to do the right thing:

$ svn revert mkpydoc
Failed to revert 'mkpydoc' -- try updating instead.

Sigh. (Hey, how come that error message didn't start with "svn: " like
all the other ones?)

"svn cleanup" fails to resolve the situation. Any other ideas? My
reptilian hindbrain wants me to edit .svn/entries and remove the entry
for "mkpydoc", which by-the-way is this:

<entry
   name="mkpydoc"
   kind="dir"
   schedule="delete"/>

...but I'm learning not to listen to it and to give the frontal lobes a
try first.

Ideas? Clues? Suggestions? I suppose I could just check out a fresh
working copy, but that's *such* a cop-out. ;-)

        Gre

-- 
Greg Ward <gward_at_python.net>                         http://www.gerg.ca/
What the hell, go ahead and put all your eggs in one basket.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 30 04:12:36 2004

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

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