You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Lares Moreau <la...@gmail.com> on 2006/03/03 14:57:12 UTC

checkout structure || subscribe

In a typical tree, is it possible to checkout a a series of tags,
branches and the trunk, selectively, while keeping the 'root' control of
the tree?

example of what I want to do:

# svn co http://foo/ -N
# cd foo
# svn co http://foo/tags -N
# svn co http://foo/branches -N
# svn co http://foo/trunk
# cd branches
# svn co http://foo/branches/branchN
# cd ..
# svn up
 - Have this step update the entire structure that I have "subscribed"
to.

svn:externals can be used, but it is not external.
svn:ignore can be used and not committed, it's a Hack.

Have I missed a feature?

-Lares
-- 
Lares Moreau <la...@gmail.com>  | LRU: 400755 http://counter.li.org
lares/irc.freenode.net                 |               ::0 Alberta, Canada
Public Key: 0D46BB6E @ subkeys.pgp.net |          Encrypted Mail Preferred
Key fingerprint = 0CA3 E40D F897 7709 3628  C5D4 7D94 483E 0D46 BB6E

Re: checkout structure || subscribe

Posted by Chris Seawood <cl...@seawood.org>.
Ryan Schmidt wrote:
> 
> On Mar 3, 2006, at 17:23, Chris Seawood wrote:
> 
>>> $ mkdir foo
>>> $ cd foo
>>> $ svn co -N $REPO/foo
>>> $ cd foo
>>> $ svn up -N tags branches
>>> $ svn up trunk branches/branchN
>>>
>>> Be aware that the -N option is broken in some ways:
>>>
>>> http://subversion.tigris.org/issues/show_bug.cgi?id=695
>>
>> How does that let you 'keep root control of the tree'?  By root control,
>> I'm assuming that svn commands issued at the toplevel directory are
>> propagated to the subdirs so that you can do working copy wide svn
>> actions like diff & commit.
> 
> Doesn't my way allow you to do that?

I initially thought it didn't but it turns out that I made a typo.  That
method works for pulling from a single tree using the svn repo tree
hierarchy.  However, it doesn't seem to work for creating a working copy
that contains dirs from multiple branches/tags.  How would you create a
working copy that looks like:
	wc/mod1       <-- trunk/mod1
	wc/mod2       <-- branches/branch1/mod2
	wc/mod3	      <-- tags/tag2/mod3
that svn will see as a single working copy?

>> We ran into a similar problem here.  We just migrated our CVS repo to
>> SVN 1.3.0 on Monday.  We have several toplevel directories that pulled
>> for any particular project.  Under CVS, we'd do:
>>     cvs co mod1 mod2 mod3/include
>> for svn, we have do to:
>>     svn co -N $REPO/trunk .
>>     make -f top.mk pull_proj1
>> where, the makefile will run
>>     svn co $REPO/trunk/$mod

> You're making many separate working copies, which Subversion will treat
> as separate entities. My way makes a single working copy (with some
> parts missing, as you wanted) so you should be able to do atomic
> operations across the whole of it.

That goes back to the question I asked in the previous email.  Is there
a way to pull multiple "toplevel" dirs without using multiple commands?
Subversion seems to (wrongly) assume that a working copy will consist of
a directory structure that can be obtained by pulling a single
directory.    Using the 'svn up -N' method works around the issue for
directories that live as direct subdir of the toplevel dir but I don't
immediately see how it can be extended to any branch/tag directory (or
subsubdir).

- cls


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: checkout structure || subscribe

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 3, 2006, at 17:23, Chris Seawood wrote:

>> $ mkdir foo
>> $ cd foo
>> $ svn co -N $REPO/foo
>> $ cd foo
>> $ svn up -N tags branches
>> $ svn up trunk branches/branchN
>>
>> Be aware that the -N option is broken in some ways:
>>
>> http://subversion.tigris.org/issues/show_bug.cgi?id=695
>
> How does that let you 'keep root control of the tree'?  By root  
> control,
> I'm assuming that svn commands issued at the toplevel directory are
> propagated to the subdirs so that you can do working copy wide svn
> actions like diff & commit.

Doesn't my way allow you to do that?


> We ran into a similar problem here.  We just migrated our CVS repo to
> SVN 1.3.0 on Monday.  We have several toplevel directories that pulled
> for any particular project.  Under CVS, we'd do:
> 	cvs co mod1 mod2 mod3/include
> for svn, we have do to:
> 	svn co -N $REPO/trunk .
> 	make -f top.mk pull_proj1
> where, the makefile will run
> 	svn co $REPO/trunk/$mod
> for each module in proj1(*).  However, running any svn commands at the
> root tree does not descend into the subdirs.  This is because the
> directories aren't listed in the toplevel dir's .svn/entries file.  I
> added a hack to the pull target to add any versioned subdirs to the
> entries file.  This seems to let me do tree wide diffs & commits and
> seems to work for multiple branches. 'svn up' is somewhat flaky so we
> just stick with the pull targets.  The hack doesn't work if you pull
> 'subdir/subsubdir' instead of 'subdir' since the .svn dir doesn't  
> exist
> for the intermediate directory when doing:
> 	svn co $REPO/trunk/$mod/include $mod/include

You're making many separate working copies, which Subversion will  
treat as separate entities. My way makes a single working copy (with  
some parts missing, as you wanted) so you should be able to do atomic  
operations across the whole of it.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: checkout structure || subscribe

Posted by Chris Seawood <cl...@seawood.org>.
Ryan Schmidt wrote:
> On Mar 3, 2006, at 15:57, Lares Moreau wrote:
> 
>> In a typical tree, is it possible to checkout a a series of tags,
>> branches and the trunk, selectively, while keeping the 'root' control of
>> the tree?
>>
>> example of what I want to do:
>>
>> # svn co http://foo/ -N
>> # cd foo
>> # svn co http://foo/tags -N
>> # svn co http://foo/branches -N
>> # svn co http://foo/trunk
>> # cd branches
>> # svn co http://foo/branches/branchN
>> # cd ..
>> # svn up
>>  - Have this st
> 
> $ mkdir foo
> $ cd foo
> $ svn co -N $REPO/foo
> $ cd foo
> $ svn up -N tags branches
> $ svn up trunk branches/branchN
> 
> Be aware that the -N option is broken in some ways:
> 
> http://subversion.tigris.org/issues/show_bug.cgi?id=695

How does that let you 'keep root control of the tree'?  By root control,
I'm assuming that svn commands issued at the toplevel directory are
propagated to the subdirs so that you can do working copy wide svn
actions like diff & commit.

We ran into a similar problem here.  We just migrated our CVS repo to
SVN 1.3.0 on Monday.  We have several toplevel directories that pulled
for any particular project.  Under CVS, we'd do:
	cvs co mod1 mod2 mod3/include
for svn, we have do to:
	svn co -N $REPO/trunk .
	make -f top.mk pull_proj1
where, the makefile will run
	svn co $REPO/trunk/$mod
for each module in proj1(*).  However, running any svn commands at the
root tree does not descend into the subdirs.  This is because the
directories aren't listed in the toplevel dir's .svn/entries file.  I
added a hack to the pull target to add any versioned subdirs to the
entries file.  This seems to let me do tree wide diffs & commits and
seems to work for multiple branches. 'svn up' is somewhat flaky so we
just stick with the pull targets.  The hack doesn't work if you pull
'subdir/subsubdir' instead of 'subdir' since the .svn dir doesn't exist
for the intermediate directory when doing:
	svn co $REPO/trunk/$mod/include $mod/include

Checking out multiple toplevel dirs seems to be a common practice so I'm
surprised that svn doesn't have a builtin mechanism to handle this.

# Add independently pulled modules to toplevel .svn/entries file
rebuild_entries:
	# Replace sed with grep
	@sed -e 's|</wc-entries>||' .svn/entries > .svn/entries.new
	@for d in `echo *`; do \
		if [ -d "$$d" -a -d "$$d/.svn" ]; then \
			echo "<entry name=\"$$d\" kind=\"dir\"/>" >> .svn/entries.new ; \
		fi ; \
	done
	@echo "</wc-entries>" >> .svn/entries.new
	@mv -f .svn/entries.new .svn/entries


* Btw, is there a better way to pull multiple toplevel dirs without
issuing individual co commands?  It seems very counter-intuitive for our
CVS users (myself included).

- cls


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: checkout structure || subscribe

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 3, 2006, at 15:57, Lares Moreau wrote:

> In a typical tree, is it possible to checkout a a series of tags,
> branches and the trunk, selectively, while keeping the 'root'  
> control of
> the tree?
>
> example of what I want to do:
>
> # svn co http://foo/ -N
> # cd foo
> # svn co http://foo/tags -N
> # svn co http://foo/branches -N
> # svn co http://foo/trunk
> # cd branches
> # svn co http://foo/branches/branchN
> # cd ..
> # svn up
>  - Have this st

$ mkdir foo
$ cd foo
$ svn co -N $REPO/foo
$ cd foo
$ svn up -N tags branches
$ svn up trunk branches/branchN

Be aware that the -N option is broken in some ways:

http://subversion.tigris.org/issues/show_bug.cgi?id=695



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE : checkout structure

Posted by Philibert Pérusse <pp...@gsmproducts.ca>.
Well, I guess I have the same issue... And I was wondering the same with the
checkout command. I would still like to get an answer.

However instead I used the SVN update command:

# svn co http://foo/ -N
# cd foo
# svn up -N tags
# svn up -N branches
# svn up trunk
# cd branches
# svn up branchN
# cd ..

As I understand it, performing an update on the root would only update the
directory structure you've got - I mean you would not download all the
branches there!

# svn up

The only issue I have there is if I want to actually get a copy of
everything! The option -R does not work with svn update.. So I can't
perform:

# svn up -R branches

..to get a copy of all branches! Any suggestions?

philibert


-----Message d'origine-----
De : Lares Moreau [mailto:lares.moreau@gmail.com] 
Envoyé : 3 mars 2006 09:57
À : users@subversion.tigris.org
Objet : checkout structure || subscribe


In a typical tree, is it possible to checkout a a series of tags, branches
and the trunk, selectively, while keeping the 'root' control of the tree?

example of what I want to do:

# svn co http://foo/ -N
# cd foo
# svn co http://foo/tags -N
# svn co http://foo/branches -N
# svn co http://foo/trunk
# cd branches
# svn co http://foo/branches/branchN
# cd ..
# svn up
 - Have this step update the entire structure that I have "subscribed" to.

svn:externals can be used, but it is not external.
svn:ignore can be used and not committed, it's a Hack.

Have I missed a feature?

-Lares
-- 
Lares Moreau <la...@gmail.com>  | LRU: 400755 http://counter.li.org
lares/irc.freenode.net                 |               ::0 Alberta, Canada
Public Key: 0D46BB6E @ subkeys.pgp.net |          Encrypted Mail Preferred
Key fingerprint = 0CA3 E40D F897 7709 3628  C5D4 7D94 483E 0D46 BB6E


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org