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

Problems renaming a folder in IDEA (Java IDE)

From: Dan Kaplan <dkaplan_at_citizenhawk.com>
Date: 2007-09-22 01:54:24 CEST

I had a long conversation on IRC's #svn trying to solve this problem. I
eventually found out how to fix this, but it doesn't seem like I should have
to resort to this. Here's the convo:

 

<tieTYT> hello, I've renamed a folder that contains files via my IDE. When
I try to commit this it always complains that the folder I deleted is out of
date

<tieTYT> it doesn't seem to care if i rename one file though

<ojacobson> out of date always means you need to run svn update.

<ojacobson> "on what" is sometimes debatable.

<tieTYT> ojacobson: yes but once i do, it never solves the problem, it just
gives me a new error

<tieTYT> i'll tell you what it is

<tieTYT> now that i've updated, it complains that the NEW folder "has a copy
flag but an invalid revision"

<ojacobson> it sounds like the IDE is doing something marginally batty
instead of using, say, 'svn mv' to rename things. If you're using
subclipse, it's possible that your command line tools and subclipse are
using different svn revisions.. :)

<tieTYT> i'm using IDEA, and it may be the same problem

<tieTYT> is there a way to fix this problem? I always resort to reverting
and renaming by hand but that really is inconvenient because IDEA knows how
to

change the package names correctly

<tieTYT> it's like 15 minutes of work and I do it almost every day

<ojacobson> well, I found the line of code that emits that message

<ojacobson> do you have a working copy showing the problem right now?

<ojacobson> can you pastebin svn info new/name/of/directory?

<ojacobson> (I suspect it's a bug in IDEA, but I'd like something more
concrete to go on :)

<tieTYT> ok i've done the change, should i update then do the svn info?

<tieTYT> or do it before the update

<ojacobson> verify that the problem happens (whatever that involves) and
triggers the 'but an invalid revision' message, then immediately afterwards
take svn info

<tieTYT> ok [note: this time I got this error without having to update
first]

<ojacobson> svn-trunk/subversion/include/svn_types.h:#define
SVN_IS_VALID_REVNUM(n) ((n) >= 0) <-- this is the check it's running afoul
of, for what it's worth

<tieTYT> http://pastebin.com/m43ac16e0

<tieTYT> Error: Commit item 'survey\model\question\visibility' has copy flag
but an invalid revision

<tieTYT> that's the error right now

<ojacobson> well, that looks kosher... you're running commit from the same
directory you ran info from?

<tieTYT> nope

<tieTYT> i'm doing it from the base dir

<ojacobson> ok

<tieTYT> i'll do it from the dir i commit from

<ojacobson> can you bin svn info -r 97
https://jsurveylib.svn.sourceforge.net/svnroot/jsurveylib/src/survey/model/q
uestion/dependency

<tieTYT> ok

<ojacobson> (verifying that the copy source really exists)

<tieTYT> yeah it gives info

<tieTYT> http://pastebin.com/m7d4a0f97

<ojacobson> that's bizarre. doubly so since it works when you move it by
hand. what does svn stat -v show for that tree?

<tieTYT> http://pastebin.com/m123ba09d

<tieTYT> i should mention i'm using tortoisesvn

<tieTYT> i got the latest version today

<ojacobson> hmm!

<ojacobson> I have a thought.

<tieTYT> this problem with IDEA has always happened for me

<tieTYT> i always dread renaming a package

<ojacobson> What if you do an svn up (or IDEA equivalent) prior to renaming
the package?

<ojacobson> at the project root

<tieTYT> I'll try

<tieTYT> so first, revert everything, update, make change?

<ojacobson> I'd still take this to the svn-users list, though.. very weird
behaviour that might be a bug and might be idea playing stupid with the
working copy

<ojacobson> revert, update, make change

<tieTYT> some info that might be useful

<tieTYT> should i revert in tortoisesvn or idea?

<ojacobson> do it in svn, it's easier to get output that way

<tieTYT> said the same thing: svn: Commit item
'survey\model\question\visibility' has copy flag but an invalid revision

<tieTYT> ojacobson: i got it to work

<tieTYT> here's what I did

<tieTYT> i went right to the folder with the changes

<tieTYT> highlighted all the folders [the deleted and the added]

<tieTYT> and committed them directly

<tieTYT> no errors

<ojacobson> tieTYT: bizarre, dude. Definitely talk to the users list; there
are some smart cookies there who don't come to IRC.

 

Hopefully those pastebin.com links are still around.

 

Thanks,

dan
Received on Sat Sep 22 01:54:52 2007

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.