Commit Graph

8 Commits

Author SHA1 Message Date
Patrick Mezard
99858baa84 eol: improve hook failure output
Before, only the first failure was reported:

  abort: b.txt should not have CRLF line endings

while now all of them are listed:

  abort: end-of-line check failed:
    d.txt in a7040e68714f should not have CRLF line endings
    b.txt in fbcf9b1025f5 should not have CRLF line endings

As first suggested by Antoine Pitrou <solipsis@pitrou.net>
2011-03-14 21:08:18 +01:00
Patrick Mezard
d52fb5d6ab eol: rename hook into checkheadshook, add checkallhook (issue2665)
"hook" is still an alias for "checkheadshook".
2011-03-13 15:07:44 +01:00
Patrick Mezard
25db85f436 eol: make the hook check all new heads, not only tip (issue2666)
Report and test by Antoine Pitrou <solipsis@pitrou.net>
2011-03-13 15:07:44 +01:00
Patrick Mezard
31042d7b6f eol: the hook no longer requires the extension to be loaded
Reading rules in the hook means we no longer need ui to be filled and do not
need reposetup() to be run anymore.
2011-03-13 15:07:44 +01:00
Martin Geisler
27c7ce1873 test-eol-*: remove unused config settings 2011-03-02 14:16:11 +01:00
Martin Geisler
83c27fb95f tests: don't overwrite HGRCPATH
Overwriting instead of appending to the file removes the [defaults]
section put into the file by run-tests.py.

It also defeats the --inotify option to run-tests.py.

(Nothing was broken yet, but the lack of -d "0 0" cause changeset
hashes to change unexpectedly in a test case I was editing.)
2011-03-01 17:01:17 +01:00
Antoine Pitrou
a5201c7f89 eol: stop after first matched rule in hook (issue2660)
When matching a file against the rules in .hgeol, the eol extension's
hook should stop after the first matching rule is encountered.
Otherwise, if this rule is contradicted by other more general rule
(for example a catch-all at the end of .hgeol), some files are simply
impossible to push. Trivial example:

  **.bat = CRLF
  **     = LF

If all matching rules were applied, a .bat file would be rejected
either because it has LFs (first rule) or because it has CRLFs (second
rule).
2011-02-27 19:50:28 +01:00
Matt Mackall
7b5f9a10ba tests: unify test-eol-hook 2010-09-26 13:41:32 -05:00