Many times I've created files, modified existing files to reference
them, tested, and committed, only to later discover I forgot to add the
newly created files to the repository.

After making this mistake, I know I'm supposed to move the bad commit to
a hidden branch and try again.  Usually I don't bother, especially if
there have been check-ins since the error was committed.  Instead I just
add the omitted files as a new check-in.  However, this complicates bisect.

In most of my projects I do a good job of maintaining the ignore-glob
setting, so fossil extras gives an accurate list of files I either need
to add to my check-in or add to ignore-glob.

It occurs to me the whole problem can be avoided by having a
check-extras setting which makes the commit command print a warning
requiring confirmation to proceed if there are any extra files.  This
setting would be off by default but can be turned on for projects that
diligently maintain ignore-glob.  The prompt might offer an option to
list the files, then (after the list is shown) ask if they all should be
added.

I usually run fossil extras along with fossil changes prior to doing
commit.  If check-extras is turned on, I suggest having fossil changes
go ahead and list the extra-but-not-added files, marking them EXTRA but
not ADDED.  This way I can run one command to get a complete list of
things pertinent to the next commit.

As for missing files, fossil commit currently fails if there are any.
The error message isn't the most helpful in the world.  It just reports
"no such file" and the first file it couldn't find.  Might be better to
explain that the commit cannot proceed because there are a certain
number of missing files, and list them.  Would it be useful to expand
check-extras to similarly offer to remove the missing files?  This is
certainly open for debate.

Getting further afield... the other warnings shown by fossil commit can
stand to be improved.  I recall character conversion problems are
reported only one at a time, so I can't fix them all at once.  If the
facility to prompt for a list of all offending files is added for the
sake of extra and missing files, it could be used to list files with
non-UTF8 and carriage returns.  Maybe even merge the lists, prefixing
each line with EXTRA or MISSING or NON_UTF8 or CRLF.

Oops, Fossil refers to CRLF as CRNL... that's always confused me.

Even further off-topic... does Fossil squawk about files using CR alone
or LFCR?

-- 
Andy Goth | <andrew.m.goth/at/gmail/dot/com>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
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