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

Re: Issue: svn:externals syntax does not accept -rHEAD

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Sat, 23 Jun 2012 00:19:32 +0200

On Fri, Jun 22, 2012 at 7:47 PM, Les Mikesell <lesmikesell_at_gmail.com> wrote:
> On Fri, Jun 22, 2012 at 12:00 PM, Ruhe Julian <jruhe_at_axway.com> wrote:
>>
>>> I'm sort of surprised a checkout works that way either.
>>
>> I hope this is an argument for expecting svn:externals to do the same.
>
> No, it is an argument for you to more closely align your
> expectations/usage to what subversion actually does.

Interesting thread. Like Les, I was convinced at first that you were
asking something that SVN simply cannot do (given its current design).

However, then I noticed that you said: "I want an error on my request
"-rHEAD path_at_peg" if the object was deleted, moved or recreated." So I
wondered what the actual behavior of checkout or update would be in
those cases (since you compared with behavior of those two
subcommands). A quick test:

[[[
C:\Temp\svntest>svnadmin create testrepos

C:\Temp\svntest>svn mkdir -mm file:///C:/Temp/svntest/testrepos/dir

Committed revision 1.

C:\Temp\svntest>svn mv -mm file:///C:/Temp/svntest/testrepos/dir
file:///C:/Temp/svntest/testrepos/dir2

Committed revision 2.

C:\Temp\svntest>svn checkout -rHEAD file:///C:/Temp/svntest/testrepos/dir_at_1
svn: E160013: File not found: revision 2, path '/dir'
]]]

Aha, so checkout cannot follow moves either. That's expected, because
svn doesn't know how to do forward history traversal (as already
discussed in this thread).

But if I understand correctly, that's perfectly valid behavior for
your use case: same behavior as checkout. If the object has moved etc,
an error is fine.

Just to be sure, I checked what happens if you don't move the target
of the checkout, but perform some other change below it. Sure enough,
checkout does the right thing: it checks out the correct item, at the
operative revision:

[[[
C:\Temp\svntest>svn mkdir -mm file:///C:/Temp/svntest/testrepos/dir2/subdir

Committed revision 3.

C:\Temp\svntest>svn co -rHEAD file:///C:/Temp/svntest/testrepos/dir2_at_2
A dir2\subdir
Checked out revision 3.

C:\Temp\svntest>dir /b dir2
subdir
]]]

Since externals (dir externals at least) are much like an embedded
checkout with some sugar on top, I think it should be doable to
implement this behavior for externals too.

Conclusion: I think you have a valid feature request. Go ahead and
file an issue.

-- 
Johan
Received on 2012-06-23 00:20:27 CEST

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.