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

Re: Branching specified revision

From: Blair Zajac <blair_at_orcaware.com>
Date: Wed, 11 Jun 2008 07:32:35 -0700

Johan Stridkvist wrote:
> 2008/6/11, Andy Levy <andy.levy_at_gmail.com <mailto:andy.levy_at_gmail.com>>:
>
> On Wed, Jun 11, 2008 at 8:11 AM, Johan Stridkvist
> <johan.stridkvist_at_gmail.com <mailto:johan.stridkvist_at_gmail.com>> wrote:
> > Hello!
> >
> > My repo is currently at revision 1100. I wanted to branch at
> r1000, and
> > branched by typing
> >
> > svn -r1000 my_trunk_url my_branch_url
> >
> > After that I checked out my branch
> >
> > svn checkout -r1000 my_branch_url wrk_dir_branch
> >
> >
> > At last I made an update in the working dir of my branch. I
> didnīt expect to
> > get any updates since nothing had been checked in into the
> branch, but there
> > were updates! Why? How do I achieve what I want?
>
> Did it say that specific files were updated, or just that you were now
> are rev 1101?
>
> When you checked out the branch, you told SVN that you wanted the
> branch URL as it looked in revision 1000. You shouldn't have done this
> - your branch URL is a copy of the trunk at whatever point in time you
> told it to make the branch (if you said to copy trunk at rev 1000 to
> the branch, then the branch is the contents of trunk at revision
> 1000).
>
> I suspect you'll need to re-create your branch using a peg revision,
> then check it out again.
>
>
>
> It updated the files, not just the revision number. I am not sure I
> understand the peg-revision stuff.
>
> If I get it right, I should do something like
> svn -r1000 checkout my_url_trunk_at_current_rev
> <mailto:my_url_trunk_at_current_rev> my_working_dir
> svn copy my_working_dir my_url_branch

That's the hard way to branch. You want to use the syntax you originally stated:

svn cp -r 1000 trunk_url branch_url

svn co branch_url

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-06-11 16:33:19 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.