You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mitchell Oslick <mo...@apple.com> on 2006/08/30 00:35:29 UTC

.cvsignore for Subversion?

I'd like to add to/resurrect the thread started by Eugene Voytitsky,
http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=22411.  I've
just started using Subversion after several years with CVS, and I too miss
the .cvsignore functionality.  As Eugene put it, Subversion has two
approaches to ignoring files: the global-ignores variable in the config
file, and svn:ignore properties on each controlled directory.  The former
is what I would call "client-side global", meaning that each client has
his/her own list, and those various lists apply to all files/directories
checked out from all repositories, whereas the latter I would call "server-
side local", meaning that the svn:ignore properties apply to all clients
who have checked out the corresponding directory but that the files and
directories ignored are only those in the corresponding directory.
     In CVS, the .cvsignore in one's home directory functions exactly like
Subversion's global-ignores, but those in CVS-managed directories do *not*
function just like svn:ignore, in that they are client-side, rather than
server-side (version-controlled).  I see that in a lot of cases--notably
the situation(s) described in the Subversion book--this is inefficient;
it's quite annoying to make each client create his/her own .cvsignore to
overlook, say, build products each will end up generating.
     But not all temporary files will be common to all clients.  I find
myself in that situation: I'll have some test files--sometimes source,
sometimes data--lying around that I don't want to check in, but do keep
around long enough that I get tired of seeing them in the status list.  Now
with Subversion, I could add such files to their directory's svn:ignore
property list.  But that forces all client to ignore files and directories
with the same names as mine.  That seems awfully presumptuous!  Just because
I, for instance, have a directory "test" that I want to ignore doesn't mean
that all other clients will want to do so.  As a result, this approach is
unacceptable.
     Since I want client-specific ignoring, I have no recourse but to use
Subversion's (only) client-specific ignoring mechanism: global-ignores.
That will do exactly what I want, but I can envision that variable becoming
really, really long as one adds every single ignored local file and directory
to it!  It would end up being hardly "global".
     The most elegant solution, I believe, would be to add .cvsignore
functionality to what Subversion already has.  Files/directories would be
ignored if (1) they appear in the global-ignores variable in the config
file; (2) they appear in the svn:ignore property of the directory in which
they reside; or (3) they appear in a ".svnignore" file in the directory in
which they reside, should a .svnignore file be present in that directory.
This would give server- *and* client-side local ignoring and client-side
global ignoring.  I hope Subversion's developers will think about adding
this feature.  Thanks for the consideration!

                                 --Mitch


-----------------------------------------------------------------------------
 Mitchell Oslick
 Pro Video Applications
 Apple Computer, Inc.
-----------------------------------------------------------------------------

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

Re: .cvsignore for Subversion?

Posted by Talden <ta...@gmail.com>.
> AFAIK, the .cvsignore file are very often added to the CVS content anyway.
> I do agree one is not forced to do so, but still.
> Maybe a "svn:local_ignore" property would do it.

I'd prefer it to be a property rather than a file as well.

I'd much prefer that ignore lists be checked into the repository.  It
avoid obscure build problems when Joe Bloggs forgets he's got a
certain file ignored that the build now depends upon.  Ideally a
checkout from the repository should work the same on any machine with
the appropriate external requirements met (build-tools, environment,
libraries if part of externals).

As for naming, how about introducing a convention of an "svn:client-"
prefix for properties that solely consumed by a compliant client... In
this case svn:client-ignore.

--
Talden

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

Re: .cvsignore for Subversion?

Posted by Olivier Sannier <ob...@free.fr>.
AFAIK, the .cvsignore file are very often added to the CVS content anyway.
I do agree one is not forced to do so, but still.
Maybe a "svn:local_ignore" property would do it.

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

RE: .cvsignore for Subversion?

Posted by Gavin Lambert <ga...@compacsort.com>.
Quoth moslick@mail-out3.apple.com <>:
>      But not all temporary files will be common to all
> clients.  I find myself in that situation: I'll have some
> test files--sometimes source, sometimes data--lying around
> that I don't want to check in, but do keep around long enough
> that I get tired of seeing them in the status list.  Now with
> Subversion, I could add such files to their directory's
> svn:ignore property list.  But that forces all client to
> ignore files and directories with the same names as mine.
> That seems awfully presumptuous!  Just because I, for
> instance, have a directory "test" that I want to ignore
> doesn't mean that all other clients will want to do so.  As a
> result, this approach is unacceptable.

Although you'll get yourself into trouble if someone *does* add a
versioned 'test' directory.  Mind you, the trouble in this case would
simply be 'svn update' failing with a 'directory already exists' error
(or maybe it's 'not a working copy' or something, I forget), so it's
manageable.

>      Since I want client-specific ignoring, I have no
> recourse but to use Subversion's (only) client-specific
> ignoring mechanism: global-ignores. That will do exactly what
> I want, but I can envision that variable becoming really,
> really long as one adds every single ignored local file and
> directory to it!  It would end up being hardly "global".

Usually you're only ignoring temporary file extensions, rather than
whole folders (though you can kinda do that, which is useful for
compiler output/intermediate directories).  AFAIK you can't really
ignore one specific "test" folder while not ignoring another "test"
folder, though, unless the one you don't want to ignore has already been
explicitly versioned.

>      The most elegant solution, I believe, would be to add
> .cvsignore functionality to what Subversion already has.
> Files/directories would be ignored if (1) they appear in the
> global-ignores variable in the config file; (2) they appear
> in the svn:ignore property of the directory in which they
> reside; or (3) they appear in a ".svnignore" file in the
> directory in which they reside, should a .svnignore file be
> present in that directory. This would give server- *and*
> client-side local ignoring and client-side global ignoring.
> I hope Subversion's developers will think about adding this
> feature.  Thanks for the consideration!

Seems reasonable to me.  +1 :)

(Except Windows Explorer doesn't actually let you create files with a
leading dot, so that might annoy some Windows users.  But then just
about any other program does, so it's not a biggie.)

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