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

Re: Do we expect default ignores when no ignores are defined

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Fri, 11 Jan 2013 17:09:05 -0500

On 01/11/2013 04:28 PM, Paul Burba wrote:
> I'm merely pointing out that the current behavior regarding the
> *default* is bizarre IMO. I could have the global-ignores option
> *purposefully* commented out/not-present in all four Windows configs
> because I don't want to ignore anything, but Subversion tries to
> outwit me and assumes the default. Seems completely
> wrong/counter-intuitive to me.

Yeah, that's the thing with .INI files -- if you comment out a line, it
doesn't exist. And a line which doesn't exists precisely means, "Please
give me the default behavior." So Subversion is giving you exactly that.

The complaint you mean to make is not that Subversion is offering the
default behavior in this situation -- it's that the default behavior itself
was perhaps ill-chosen and non-intuitive. If you claimed that the
hard-coded default should instead be the empty string, I'm sure you'd find
widespread agreement across both the dev and user landscapes.

But that's not the default, and the reason for that goes waaaaay back to
"behaviors we chose to inherit from CVS". :-(

> Look at it this way: Assume we only have the per-user config present.
> You don't find it odd that these two config files behave differently?
> [[[
> [miscellany]
> # Hey, I don't want to ignore anything, so comment out the default!
> # global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc
> *.pyo __pycache__ *.rej *~ #*# .#* .*.swp .DS_Store
> ]]]
> [[[
> [miscellany]
> # Hey, I don't want to ignore anything, so set global-ignores to an empty val!
> global-ignores =
> ]]]

Personally, I fully expect these two configurations to behave differently.
But I suspect that that's because I'm the kind of guys who believes it to be
a best-practice of config file templates to show the default value of the
setting in the commented out text. I also don't tend to "uncomment" such
lines in config files at all -- I add new lines that represent what I want,
leaving the commented-out, presumed-to-show-the-default-value lines for
future reference. My config file would likely read like so:

### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its 'status' output, and
### while importing or adding files and directories.
### '*' matches leading dots, e.g. '*.rej' matches '.foo.rej'.
# global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo
__pycache__ *.rej *~ #*# .#* .*.swp .DS_Store
global-ignores =


C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development

Received on 2013-01-11 23:09:42 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.