subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tati, Aslesh" <at...@barclaycardus.com>
Subject RE: Subversion checkout behavior at non-existent revision
Date Wed, 11 May 2016 15:46:04 GMT
It makes sense to me now.

Thank you Daniel.

-----Original Message-----
From: Daniel Shahaf [mailto:danielsh@apache.org]
Sent: Monday, May 09, 2016 6:15 PM
To: Tati, Aslesh
Cc: users@subversion.apache.org
Subject: Re: Subversion checkout behavior at non-existent revision

Tati, Aslesh wrote on Fri, May 06, 2016 at 21:33:40 +0000:
> Hi,
>
> I have a question about the behavior of svn checkout. Here is the scenario:
> I have a standard trunk, branches, tags structure for one of my apps in a repo and I
created a branch, say at revision 500 of trunk.
> Later, I delete the branch and the recreate another branch with the same name and at
the same revision 500 of trunk.
>
> Now I'm trying to check out the branch at revision 500. I know that the branch doesn't
exist at r500 (it will be some higher revision), only trunk does and it probably doesn't make
sense to check out a branch at that revision; but I'm interested in knowing why this behavior
occurs and if it is expected.
>
> svn co <REPO_URL>/branches/<BRANCH>@500 --> svn info on that gives the
> URL as expected i.e. <REPO_URL>/branches/<BRANCH>
>
> svn co -r 500 <REPO_URL>/branches/<BRANCH> --> svn info on that gives
> an unexpected result i.e. <REPO_URL>/trunk
>
> Shouldn't subversion complain that the branch doesn't exist at revision 500?

No.

«svn checkout -r 500 <REPO_URL>/branches/<BRANCH>» means "Look what BRANCH is
in rHEAD, trace copies back to r500, then operate on that", which is why it checks out trunk@r500.

«svn checkout -r 500 <REPO_URL>/branches/<BRANCH>@500» will do what you expect
(error out with "does not exist at that revision").

The peg revision of URLs defaults to HEAD.  The operative revision defaults to the peg revision.

http://svnbook.red-bean.com/en/1.8/svn.advanced.pegrevs.html#svn.advanced.pegrevs.algorithm

Cheers,

Daniel

> If it has checked out without complaining, why does svn info using the second way of
checkout show the unexpected result?
Barclaycard

www.barclaycardus.com<http://www.barclaycardus.com>

This email and any files transmitted with it may contain confidential and/or proprietary information.
It is intended solely for the use of the individual or entity who is the intended recipient.
Unauthorized use of this information is prohibited. If you have received this in error, please
contact the sender by replying to this message and delete this material from any system it
may be on.
Mime
View raw message