BinaryDiff requieres incremental order of versions?

9 views
Skip to first unread message

luxspes

unread,
Apr 24, 2009, 12:33:28 PM4/24/09
to ivysvn
I uploaded Spring 2.5.5, and then tried to upload 2.0.8 from a local
filesystem repository into a ivysvn repository, I am getting an error.
The problem seems to be at the method public String
determineBinaryDiffFolderPath(String revision, String
binaryDiffFolderName) in the PutOperation class. I think it could be
because BinaryDiff is unable to deal with imports that are not in
"version order". (first 2.5.5 then 2.0.8)

Is my guess right?

Here is my full stack trace:

C:\devstudio\apache\ivy-2.0.0\src\example\build-repository\build.xml:
53: The fol
lowing error occurred while executing this line:
C:\devstudio\apache\ivy-2.0.0\src\example\build-repository\build.xml:
75: impossi
ble to install org.springframework#spring;2.0.8:
java.lang.IllegalStateException
: Ivy destination folder 'trunk/org.springframework/spring/2.0.8' does
not conta
in revision '2.5.5'
at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(Projec
tHelper.java:508)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:418)
at org.apache.tools.ant.taskdefs.CallTarget.execute
(CallTarget.java:105)

at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:
1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:
1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:
104)
Caused by: C:\devstudio\apache\ivy-2.0.0\src\example\build-repository
\build.xml:
75: impossible to install org.springframework#spring;2.0.8:
java.lang.IllegalSta
teException: Ivy destination folder 'trunk/org.springframework/spring/
2.0.8' doe
s not contain revision '2.5.5'
at org.apache.ivy.ant.IvyInstall.doExecute(IvyInstall.java:
109)
at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1337)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
CheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:
1189)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
... 18 more
Caused by: java.lang.IllegalStateException: Ivy destination folder
'trunk/org.sp
ringframework/spring/2.0.8' does not contain revision '2.5.5'
at
fm.last.ivy.plugins.svnresolver.PutOperation.determineBinaryDiffFolde
rPath(PutOperation.java:129)
at
fm.last.ivy.plugins.svnresolver.SvnPublishTransaction.addPutOperation
(SvnPublishTransaction.java:135)
at fm.last.ivy.plugins.svnresolver.SvnRepository.put
(SvnRepository.java:
291)
at org.apache.ivy.plugins.repository.AbstractRepository.put
(AbstractRepo
sitory.java:130)
at org.apache.ivy.plugins.resolver.RepositoryResolver.put
(RepositoryReso
lver.java:219)
at org.apache.ivy.plugins.resolver.RepositoryResolver.publish
(Repository
Resolver.java:209)
at org.apache.ivy.core.install.InstallEngine.install
(InstallEngine.java:
142)
at org.apache.ivy.Ivy.install(Ivy.java:526)
at org.apache.ivy.ant.IvyInstall.doExecute(IvyInstall.java:
101)
... 32 more
--- Nested Exception ---
C:\devstudio\apache\ivy-2.0.0\src\example\build-repository\build.xml:
75: impossi
ble to install org.springframework#spring;2.0.8:
java.lang.IllegalStateException
: Ivy destination folder 'trunk/org.springframework/spring/2.0.8' does
not conta
in revision '2.5.5'
at org.apache.ivy.ant.IvyInstall.doExecute(IvyInstall.java:
109)
at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1337)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
CheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:
1189)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
at org.apache.tools.ant.taskdefs.CallTarget.execute
(CallTarget.java:105)

at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:
1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:
1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:
104)
Caused by: java.lang.IllegalStateException: Ivy destination folder
'trunk/org.sp
ringframework/spring/2.0.8' does not contain revision '2.5.5'
at
fm.last.ivy.plugins.svnresolver.PutOperation.determineBinaryDiffFolde
rPath(PutOperation.java:129)
at
fm.last.ivy.plugins.svnresolver.SvnPublishTransaction.addPutOperation
(SvnPublishTransaction.java:135)
at fm.last.ivy.plugins.svnresolver.SvnRepository.put
(SvnRepository.java:
291)
at org.apache.ivy.plugins.repository.AbstractRepository.put
(AbstractRepo
sitory.java:130)
at org.apache.ivy.plugins.resolver.RepositoryResolver.put
(RepositoryReso
lver.java:219)
at org.apache.ivy.plugins.resolver.RepositoryResolver.publish
(Repository
Resolver.java:209)
at org.apache.ivy.core.install.InstallEngine.install
(InstallEngine.java:
142)
at org.apache.ivy.Ivy.install(Ivy.java:526)
at org.apache.ivy.ant.IvyInstall.doExecute(IvyInstall.java:
101)
... 32 more
--- Nested Exception ---
java.lang.IllegalStateException: Ivy destination folder 'trunk/
org.springframewo
rk/spring/2.0.8' does not contain revision '2.5.5'
at
fm.last.ivy.plugins.svnresolver.PutOperation.determineBinaryDiffFolde
rPath(PutOperation.java:129)
at
fm.last.ivy.plugins.svnresolver.SvnPublishTransaction.addPutOperation
(SvnPublishTransaction.java:135)
at fm.last.ivy.plugins.svnresolver.SvnRepository.put
(SvnRepository.java:
291)
at org.apache.ivy.plugins.repository.AbstractRepository.put
(AbstractRepo
sitory.java:130)
at org.apache.ivy.plugins.resolver.RepositoryResolver.put
(RepositoryReso
lver.java:219)
at org.apache.ivy.plugins.resolver.RepositoryResolver.publish
(Repository
Resolver.java:209)
at org.apache.ivy.core.install.InstallEngine.install
(InstallEngine.java:
142)
at org.apache.ivy.Ivy.install(Ivy.java:526)
at org.apache.ivy.ant.IvyInstall.doExecute(IvyInstall.java:
101)
at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1337)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
CheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:
1189)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
at org.apache.tools.ant.taskdefs.CallTarget.execute
(CallTarget.java:105)

at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:
1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:
1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:
104)

Adrian Woodhead

unread,
Apr 30, 2009, 1:13:50 PM4/30/09
to ivy...@googlegroups.com
This sounds very strange. I just wrote a unit test which attempts to do
what you describe and it works for me. If you look in the IvySvn trunk at:

https://ivysvn.googlecode.com/svn/trunk/test/java/fm/last/ivy/plugins/svnresolver/SvnRepositoryPublishTest.java

the last test method:

testNonIncrementalVersions_BinaryDiff()

Note that if you do this the binaryDiff folder will contain 2.0.8 as the
revision for LATEST, not 2.5.5 as LATEST in this sense means "latest
published version" not "highest version number".

If you still experience this problem please attach your ivy.xml,
ivysettings.xml and the output from running each step from ant with the
"-d" flag.

Regards,

Adrian

luxspes

unread,
May 1, 2009, 12:24:36 AM5/1/09
to ivysvn
Mmmm.... Maybe is a "secondary effect" of my patch to deal with the
OPTIONS when the if root of the repository is private...
have you had a chance to look at the patch?

On Apr 30, 12:13 pm, Adrian Woodhead <adr...@last.fm> wrote:
> This sounds very strange. I just wrote a unit test which attempts to do
> what you describe and it works for me. If you look in the IvySvn trunk at:
>
> https://ivysvn.googlecode.com/svn/trunk/test/java/fm/last/ivy/plugins...
> ...
>
> read more »

Adrian Woodhead

unread,
May 1, 2009, 2:48:29 PM5/1/09
to ivy...@googlegroups.com

> Mmmm.... Maybe is a "secondary effect" of my patch to deal with the
> OPTIONS when the if root of the repository is private...
>
That's possible, although it sounds strange, hard to tell from that
error message.

> have you had a chance to look at the patch?
>
Not properly. I've been talking to the SVNKit people and they've given
me some tips for improving the way IvySvn communicates with SVN. I would
like to redo a lot of things with that in mind, and will then hopefully
never need to change to the root of the repository but instead use the
value passed to IvySvn as the repositoryRoot, like it should be, which I
think will solve your issue.

luxspes

unread,
May 6, 2009, 9:48:00 AM5/6/09
to ivysvn
Ok, for the moment it is working fine, I just disabled the binary
diff, and now I can upload anything in any version
order... strange error...

luxspes

unread,
May 6, 2009, 9:56:45 AM5/6/09
to ivysvn
Hi!

> Not properly. I've been talking to the SVNKit people and they've given
> me some tips for improving the way IvySvn communicates with SVN. I would
> like to redo a lot of things with that in mind, and will then hopefully
> never need to change to the root of the repository but instead use the
> value passed to IvySvn as the repositoryRoot, like it should be, which I
> think will solve your issue.

Well, maybe with my patch you are almost there, right now, the new
attribute added by my patch "projectRoot" is
separated of the "repositoryRoot", maybe the solution is to add code
to "split" the last directory of the path in repositoryRoot and pass
it to as the
value for "projectRoot"... that would make my patch work without
altering the format of the configuration file

Adrian Woodhead

unread,
May 12, 2009, 1:57:24 PM5/12/09
to lux...@hotmail.com, ivy...@googlegroups.com
Hey,

I've had a look at your patch and I agree it would be nice if
"projectRoot" wasn't required to be added to the configuration file.
What I am trying to do now is for "repositoryRoot" to be the full path
to the base of the Ivy repository in SVN (i.e. not the SVN repository
root as it is currently). In this way I think "repositoryRoot" becomes
more or less what "projectRoot" was to you. So far I have got this
working with the retrieve unit tests, will work on the publish ones
next. I will also have to see how this impacts some other issues which
might be related to this. I'll let you know how this goes.

Adrian
Reply all
Reply to author
Forward
0 new messages