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

Re: checkout structure || subscribe

From: Chris Seawood <cls_at_seawood.org>
Date: 2006-03-03 17:23:49 CET

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
Received on Fri Mar 3 17:29:44 2006

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.