Some time ago, I added versioned settings "ignore-glob" to
Tcl's and Tk's fossil repositories, so "fossil extras" would not
list all *.o files any more: I know that *.o files never should
be committed, my expectation was that "ignore-glob" would
prevent that. That worked fine, but it had the unexpected
side-effect that "fossil clean" didn't work any more!

"ignore-glob" is documented to specify GLOB patters for
files which should be ignored by "fossil extras". That's
perfectly clear. But for "fossil clean", what should be done
with "ignored" files? Files like *.o files, I expect them to
be cleaned without notice, but I could imagine the desire
for other files like *.log that should be kept.

Branch "clean-with-ignore" contains my proposed solution
for this: modify the "fossil clean" command such that
"ignored" files are cleaned without asking for confirmation
first. That's what I expect for *.o files. See:
    <http://www.fossil-scm.org/index.html/info/9e4a7190af>

Joe Mistachkin already reminded me of the danger in that
change, therefore I suggest to add a new "--keep" option
and a matching versioned setting "keep-glob". Setting
"keep-glob" to the same value as "ignore-glob" makes fossil
behave as it does now. (It means that "fossil clean" wouldn't
clean ignored files any more, but the mentioned danger is gone)

2013/3/10 Joe Mistachkin <j...@mistachkin.com>:
> If there is a desire to have a setting to specify which files can be removed
> via clean without confirmation, that should be an entirely new setting,
> perhaps called something like "clean-glob".
Joe's suggestion of "clean-glob"/"ignore-glob" is possible, but
"ignore-glob"/"keep-glob" describes better what is really
happening. Subversion and CVS have svn:ignore and ".ignore"
files, normally used for files like *.o, which are expected to
be cleaned by "make clean". "keep-glob" can be used to
override that: protect files which should be kept always.

By no means, this change changes the meaning of the
"ignore-glob" setting as currently documented: "fossil extras"
is not modified in any way. It only allows "fossil clean" to
specify what to do with "ignored" files: either remove
them without asking for confirmation (ignore-glob)  or
keep them without asking for confirmation (keep-glob).

Any other ideas? Should "fossil clean" be undo-able like
"fossil revert", or do we expect that people setting
"ignore-glob" know what they are doing? ....

Regards,
        Jan Nijtmans
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to