You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by frame <xs...@yahoo.com> on 2012/04/26 20:15:12 UTC

How to ignore a versioned subdirectory within the whole tree during svn update?

Hi,

Our team's whole repository tree is like:

build.xml
1.txt
2.txt
dir_a/
dir_big_and_un_related_to_me/
..
dir_h/

The dir_big_and_un_related_to_me/ is very, very big and it is not relevant 
to my own work. Every time, when I run "svn update" at the top, I hope that 
directory is ignored. But I don't know how to do it. I am wondering if svn 
has a feature for this purpose. The whole tree has been checked out to my 
local area. I just want to start from now on, ignore that big directory 
when I do "svn update". I know there is "limit" option, but I am not sure 
how to apply it in my case.
I don't want to go into individual subdirectories, skipping that 
directory,  to update because I will missing updating the files build.xml, 
1.txt etc. And if somebody added a parrelel directory "dir_i", then I will 
miss adding that to my local area.

Thank you very much. 


RE: How to ignore a versioned subdirectory within the whole tree during svn update?

Posted by Bob Archer <Bo...@amsi.com>.
> On Thu, Apr 26, 2012 at 1:52 PM, Stefan Sperling <st...@elego.de> wrote:
> > On Thu, Apr 26, 2012 at 08:41:55PM +0200, Stefan Sperling wrote:
> >> svn checkout --depth empty URL
> >> svn ls   (view items that could be here) for each item of interest:
> >>   svn checkout --set-depth infinity item_of_interest
> >
> > Sorry, that last line should say:
> >
> >    svn update --set-depth infinity item_of_interest
> 
> If you do that, what happens as new directories are added by others to the
> base?  Will this checkout ignore or include them in subsequent updates?

They will be ignored because the depth of your root folder in your WC is "empty".

BOb


Re: How to ignore a versioned subdirectory within the whole tree during svn update?

Posted by Les Mikesell <le...@gmail.com>.
On Thu, Apr 26, 2012 at 1:52 PM, Stefan Sperling <st...@elego.de> wrote:
> On Thu, Apr 26, 2012 at 08:41:55PM +0200, Stefan Sperling wrote:
>> svn checkout --depth empty URL
>> svn ls   (view items that could be here)
>> for each item of interest:
>>   svn checkout --set-depth infinity item_of_interest
>
> Sorry, that last line should say:
>
>    svn update --set-depth infinity item_of_interest

If you do that, what happens as new directories are added by others to
the base?  Will this checkout ignore or include them in subsequent
updates?

-- 
  Les Mikesell
    lesmikesell@gmail.com

Re: How to ignore a versioned subdirectory within the whole tree during svn update?

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Apr 26, 2012 at 08:41:55PM +0200, Stefan Sperling wrote:
> svn checkout --depth empty URL
> svn ls   (view items that could be here)
> for each item of interest:
>   svn checkout --set-depth infinity item_of_interest

Sorry, that last line should say:

    svn update --set-depth infinity item_of_interest

RE: How to ignore a versioned subdirectory within the whole tree during svn update?

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Stefan Sperling [mailto:stsp@elego.de]
> Sent: donderdag 26 april 2012 20:42
> To: frame
> Cc: users@subversion.apache.org
> Subject: Re: How to ignore a versioned subdirectory within the whole tree
during
> svn update?
> 
> On Thu, Apr 26, 2012 at 11:15:12AM -0700, frame wrote:
> > Hi,
> >
> > Our team's whole repository tree is like:
> >
> > build.xml
> > 1.txt
> > 2.txt
> > dir_a/
> > dir_big_and_un_related_to_me/
> > ..
> > dir_h/
> >
> > The dir_big_and_un_related_to_me/ is very, very big and it is not
relevant
> > to my own work. Every time, when I run "svn update" at the top, I hope
that
> > directory is ignored. But I don't know how to do it. I am wondering if
svn
> > has a feature for this purpose.
> 
> Use the 'sparse checkout' feature.
> 
> svn update --set-depth exclude dir_big_and_un_related_to_me
> 
> > The whole tree has been checked out to my local area.
> 
> When getting a fresh checkout you might want to something like this:
> 
> svn checkout --depth empty URL
> svn ls   (view items that could be here)
> for each item of interest:
>   svn checkout --set-depth infinity item_of_interest

Replace this 'checkout' with 'update', or you get just many separate working
copies. In this case you can also drop the '--set-depth infinity' as that is
the default for new nodes that come in from the repository this way.

	Bert


Re: How to ignore a versioned subdirectory within the whole tree during svn update?

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Apr 26, 2012 at 11:15:12AM -0700, frame wrote:
> Hi,
> 
> Our team's whole repository tree is like:
> 
> build.xml
> 1.txt
> 2.txt
> dir_a/
> dir_big_and_un_related_to_me/
> ..
> dir_h/
> 
> The dir_big_and_un_related_to_me/ is very, very big and it is not relevant 
> to my own work. Every time, when I run "svn update" at the top, I hope that 
> directory is ignored. But I don't know how to do it. I am wondering if svn 
> has a feature for this purpose.

Use the 'sparse checkout' feature.

svn update --set-depth exclude dir_big_and_un_related_to_me

> The whole tree has been checked out to my local area.

When getting a fresh checkout you might want to something like this:

svn checkout --depth empty URL
svn ls   (view items that could be here)
for each item of interest:
  svn checkout --set-depth infinity item_of_interest

For more information, see:
http://svnbook.red-bean.com/en/1.7/svn.advanced.sparsedirs.html