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

Re: Issues with branches

From: Stephen Butler <sbutler_at_elego.de>
Date: Wed, 13 May 2009 08:52:38 +0200

Quoting webpost_at_tigris.org:

> Hi All,
>
> Recently while doing some experiments with the subversion, I have
> encountered with an issue while trying to checkout from a branch at
> a old revision. This branch is no longer present under the current
> revision, but I was sure that this branch existed within the older
> revision
>
> My repo layout is as follows at Revision:1
>
> myrepo
> |------ main (My ongoing development branch)
> |------ branches (Used to hold the testing branch)
>
> At revision 4 I had decided to branch the code from main. And the
> structure after copy was
>
> svn copy http://localhost/repo/myrepo/main
> http://localhost/repo/myrepo/branches
>
> Now this is at Rev :5
>
> myrepo
> |------ main
> |------ branches/main
>
> Rev:6 I made changes in branch
>
> Rev:7 Made the same changes in main
>
> Rev: 8 removed branches/main Since we are done with phase 1
>
> Phase 2 development goes and goes and revision in main is 10
>
> Somebody find an issue with the current production code and I had
> to create a new branch to fix this issue. And I know that this is
> released from http://localhost/repo/myrepo/branches/main at revision
> 6:
>
> svn list http://localhost/repo/myrepo/branches/ -r6
> main/
>
> I found that branches/main is available in revision 6. So I went
> ahead and tried to checkout rev:6 from
> http://localhost/repo/myrepo/branches/
>
>
> svn co http://localhost/repo/myrepo/branches/main -r6
> svn: REPORT request failed on '/repo/myrepo/!svn/bc/10/branches/main'
> svn: '/repo/myrepo/!svn/bc/10/branches/main' path not found
>
> But I can checkout by svn co http://localhost/repo/myrepo/branches/ -r6
>
> svn co http://localhost/repo/myrepo/branches/ -r6
> A branches/main
> A branches/main/src
> A branches/main/src/com
> A branches/main/src/com/A.java
> Checked out revision 6.
>
> It gave me an exact copy of what was there at Revision: 6
>
> I was able to copy the branches/main at rev:6 into a new branch
>
> svn copy http://localhost/repo/myrepo/branches/main -r6
> http://localhost/repo/myrepo/branches/bugfix -m "bug fix"
>
> I am confused at this point why it didn't allowed me to checkout
> from rev:6 using the url http://localhost/repo/myrepo/branches/main
>
> It would be highly appreciable if somebody could explain on this
>
> Thanks,
> Deepesh
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2230409

Hi Deepesh,

The ^/branches/main at r10 existed at ^/main at r6. To refer to
^/branches/main at r6, use a peg revision:

   http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html

Also, it's better to give each branch a unique name when copying:

   svn copy ^/main ^/branches/release-1.x-prep

Regards,
Steve

-- 
Stephen Butler | Software Developer
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
fon: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
Received on 2009-05-13 08:53:42 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.