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

Re: [Subclipse-users] package rename bugs

From: Mark Phippard <markphip_at_gmail.com>
Date: Fri, 4 Jan 2008 15:40:35 -0500

On Jan 4, 2008 10:55 AM, Peter Mb <mb.peter_at_yahoo.com> wrote:

> We are experiencing some package rename peculiarities. Some of which I
> have been able to reproduce.

Rename is pretty limited in core Subversion so we have to do some
workarounds to deal with the problems. Fortunately, the next release
of Subversion (1.5) removes most/all of these limitations so we can
remove our workarounds. The biggest issue is that you cannot rename
something more than once without a commit. So rename a package and
then rename it again or even then rename a class in the package will
have problems.

> First, sometimes, when renaming packages having a common parent
> package, the old parent package remains, both locally and in the repository.
>
> Start out with packages
>
> org.cmopany.core.dao
> org.cmopany.core.dto
> org.cmopany.core.model
>
> Each holding a single java file.
>
> Correct the typo by renaming each package, commit and you end up with
>
> org.cmopany.core
> org.company.core.dao
> org.company.core.dto
> org.company.core.model
>
> both locally and in the repository.

Did you do your commit from the project root? A rename in Subversion
is implemented internally as a copy + delete. It sounds like you are
only committing the copy and not the delete. There are also cases
where the way the Eclipse refactor commands send things through is as
a move of the classes in the package rather than a rename of the
package itself.

> Second, renaming a middle package component, after having succesfully
> renamed and commited the last package component results in an error when
> trying to submit: "Item is out-of-date".
>
> Start out with a package
>
> one.tw.thre
>
> holding a single java file.
>
> rename to
>
> one.tw.three
>
> commit.
>
> All is fine at this point.
>
> Now, rename to
>
> one.two.three
>
>
> and the commit fails with
>
> Item is out-of-date
> svn: Commit failed (details follow):
> svn: Item '/dir-rename-report1/src/one/tw' is out of date

Item out of date just means you need to perform an update on your
working copy. See this:

http://markphip.blogspot.com/2006/12/mixed-revision-working-copies.html

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subclipse.tigris.org
For additional commands, e-mail: users-help_at_subclipse.tigris.org
Received on 2008-01-04 21:54:50 CET

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

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