You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Phillip Rhodes <mi...@cpphacker.co.uk> on 2008/03/23 02:45:21 UTC

Is there any way to ignore locally deleted files on svn update?

Hi all, I have a (perhaps unusual) situation that I'm trying
to resolve, with no luck yet.  Hoping someone here may be
able to help.

Basically, I have an svn repo, with a trunk dir that contains
a number of modules, which are all interrelated as part of
a larger project.  So, something like:

trunk/
      module1/
      module2/
      module3/
      ...

The problem is, I've recently added some new modules that need
to be versioned, but that most people won't care about (yet).
Since the number of modules is fairly large, I'd like the checkout
script to delete these semi-superfluous modules
from the working copyies.  But doing so, they are just restored
if the user does an "svn up" in the trunk dir of the working copy.

svn:ignore doesn't work for this, since I don't actually want the
modules ignored in all working copies. I basically just want a way
to "hide" them in the working copies of folks who won't be interested
in them at the moment.

Is anything like this possible?


Thanks,

-- 
Phillip Rhodes
Chief Architect - OpenQabal
https://openqabal.dev.java.net
LinkedIn: http://www.linkedin.com/in/philliprhodes

Re: Is there any way to ignore locally deleted files on svn update?

Posted by Phillip Rhodes <mi...@cpphacker.co.uk>.
Phillip Rhodes wrote:
> Karl Fogel wrote:

> Now if this stuff is implemented in the client, then I might be
> able to play with it before the upgrade (who knows when that will be, of 
> course).

That should be "before they upgrade" of course, where "they" is 
java.net.  :-)


TTYL,


-- 
Phillip Rhodes
Chief Architect - OpenQabal
https://openqabal.dev.java.net
LinkedIn: http://www.linkedin.com/in/philliprhodes

Re: Is there any way to ignore locally deleted files on svn update?

Posted by Phillip Rhodes <mi...@cpphacker.co.uk>.
Karl Fogel wrote:

> The upcoming --depth feature ("sparse checkouts" or "sparse
> directories") will support what you need, but you'll probably want
> wrapper scripts to invoke the right series of commands to construct the
> sparse working copy.
> 
> http://subversion.tigris.org/svn_1.5_releasenotes.html#sparse-checkouts
> has more details.

Ok, cool, I'll check it out.

> 
> Remember, this isn't available until 1.5 comes out, unless you want to
> use trunk or the pre-release testing distributions (which we encourage
> as long as you're comfortable using beta software).


I don't have much control of it anyway, if the server version matters, 
as this is all for an open source project that's hosted at java.net.
Now if this stuff is implemented in the client, then I might be
able to play with it before the upgrade (who knows when that will be, of 
course).


TTYL,

-- 
Phillip Rhodes
Chief Architect - OpenQabal
https://openqabal.dev.java.net
LinkedIn: http://www.linkedin.com/in/philliprhodes

Re: Is there any way to ignore locally deleted files on svn update?

Posted by Karl Fogel <kf...@red-bean.com>.
Phillip Rhodes <mi...@cpphacker.co.uk> writes:
> John M. Black wrote:
>> We have a situation exactly like this.  We simply instruct people
>> not to just check out "trunk", but instead check out the specific
>> projects they need "trunk/project".
>>
>> Those of us who use command line use batch files to update each repo
>> found within the trunk WC folder.  
>
> Yeah, looks like writing a script to do the updates is the solution I
> want, if there's no easy way to do this natively with SVN.  Since I
> use
> a script to do the checkout now, changing from checking out trunk to
> checking out the individual modules is easy enough.  And the script you
> mention works around the problem of folks having to run svn up multiple
> times from the command line, in order to get updates.

The upcoming --depth feature ("sparse checkouts" or "sparse
directories") will support what you need, but you'll probably want
wrapper scripts to invoke the right series of commands to construct the
sparse working copy.

http://subversion.tigris.org/svn_1.5_releasenotes.html#sparse-checkouts
has more details.

Remember, this isn't available until 1.5 comes out, unless you want to
use trunk or the pre-release testing distributions (which we encourage
as long as you're comfortable using beta software).

-Karl

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

Re: Is there any way to ignore locally deleted files on svn update?

Posted by Phillip Rhodes <mi...@cpphacker.co.uk>.
John M. Black wrote:
> 
> We have a situation exactly like this.  We simply instruct people not to 
> just check out "trunk", but instead check out the specific projects they 
> need "trunk/project".
> 
> Those of us who use command line use batch files to update each repo 
> found within the trunk WC folder.  

Yeah, looks like writing a script to do the updates is the solution I 
want, if there's no easy way to do this natively with SVN.  Since I use
a script to do the checkout now, changing from checking out trunk to
checking out the individual modules is easy enough.  And the script you
mention works around the problem of folks having to run svn up multiple
times from the command line, in order to get updates.


Thanks,


-- 
Phillip Rhodes
Chief Architect - OpenQabal
https://openqabal.dev.java.net
LinkedIn: http://www.linkedin.com/in/philliprhodes

Re: Is there any way to ignore locally deleted files on svn update?

Posted by "John M. Black" <jo...@gmail.com>.
On Sat, Mar 22, 2008 at 10:45 PM, Phillip Rhodes <mi...@cpphacker.co.uk>
wrote:

> Basically, I have an svn repo, with a trunk dir that contains
> a number of modules, which are all interrelated as part of
> a larger project.  [...]
> I'd like the checkout script to delete these semi-superfluous modules
> from the working copyies.  But doing so, they are just restored
> if the user does an "svn up" in the trunk dir of the working copy.
>


We have a situation exactly like this.  We simply instruct people not to
just check out "trunk", but instead check out the specific projects they
need "trunk/project".

Those of us who use command line use batch files to update each repo found
within the trunk WC folder.  Those of use who use Tortoise just select all
the folders inside the trunk WC folder and update.  This proved to be much
simpler and less prone to human error than trying to delete or hide
anything.

-John

Re: Is there any way to ignore locally deleted files on svn update?

Posted by Phillip Rhodes <mi...@cpphacker.co.uk>.
Ryan Schmidt wrote:
> On Mar 22, 2008, at 21:45, Phillip Rhodes wrote:
> 

> Of course it depends on why you're wanting to delete the unneeded 
> modules locally. If it's a reason other than disk space, this solution 
> may not be useful to you.

It's really just about eliminating confusion and keeping cruft out
of the way.  If a certain module is new / experimental or something and
unneeded by most developers, I'd just prefer they not have to see it
in their tree at all.  It's not exactly a big deal though, just 
something I was hoping to be able to do.

Sounds like the sparse checkout stuff in 1.5 is exactly what I need, so 
I'm just not going to worry much about it for now.  I'm going with the
approach of not checking out trunk but checking out the individual
modules, and just supplying a handy script to update all modules.

Once 1.5 is out and in wide circulation, I may revisit this. :-)


TTYL,


-- 
Phillip Rhodes
Chief Architect - OpenQabal
https://openqabal.dev.java.net
LinkedIn: http://www.linkedin.com/in/philliprhodes

Re: Is there any way to ignore locally deleted files on svn update?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 22, 2008, at 21:45, Phillip Rhodes wrote:

> Basically, I have an svn repo, with a trunk dir that contains
> a number of modules, which are all interrelated as part of
> a larger project.  So, something like:
>
> trunk/
>      module1/
>      module2/
>      module3/
>      ...
>
> The problem is, I've recently added some new modules that need
> to be versioned, but that most people won't care about (yet).
> Since the number of modules is fairly large, I'd like the checkout
> script to delete these semi-superfluous modules
> from the working copyies.  But doing so, they are just restored
> if the user does an "svn up" in the trunk dir of the working copy.
>
> svn:ignore doesn't work for this, since I don't actually want the
> modules ignored in all working copies. I basically just want a way
> to "hide" them in the working copies of folks who won't be interested
> in them at the moment.
>
> Is anything like this possible?

Yes... Create an empty directory in the repo, e.g.

svn mkdir $REPO/empty -m "making empty directory"

Now when users check out trunk...

svn checkout $REPO/trunk /path/to/wc

...they'll get all modules. If the modules are large, this may take  
some time. But it'll only be on the initial checkout, because now if  
you want the user to not have e.g. module2 you can say...

svn switch /path/to/wc/module2 $REPO/empty

The module2 directory will remain but it won't contain anything  
(other than the administrative .svn directory).

Try it out.

Of course it depends on why you're wanting to delete the unneeded  
modules locally. If it's a reason other than disk space, this  
solution may not be useful to you.


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