Commit Graph

17 Commits

Author SHA1 Message Date
Bryan O'Sullivan
7396bcb61d ignore: process hgignore files in deterministic order
Previously, we processed them in whatever order the dict iterator gave us.
2012-12-17 15:57:02 -08:00
Bryan O'Sullivan
b79fd1a32c ignore: only read an ignore file once 2012-12-17 15:52:44 -08:00
Bryan O'Sullivan
09995e8825 ignore: refactor ignore into two functions
This prepares us for eventually being able to hash the list of patterns
in use.
2012-12-17 16:23:37 -08:00
Mads Kiilerich
ac8e1fc147 check-code: there must also be whitespace between ')' and operator
The check pattern only checked for whitespace between keyword and operator.

Now it also warns:
 >     x = f(),7
 missing whitespace after ,
 >     x = f()+7
 missing whitespace in expression
2012-12-09 23:33:16 +01:00
Matt Mackall
864ce9da04 misc: adding missing file close() calls
Spotted by Victor Stinner <victor.stinner@haypocalc.com>
2011-11-03 11:24:55 -05:00
Martin Geisler
4009f00b54 remove unnecessary list comprehensions
These result lists were only built for the side effects, and so a
normal loop is just as good and more straight-forward.
2011-02-03 10:31:17 +01:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Brendan Cully
afaf6c9af8 ignore: separate pattern extraction from match compilation
hgignore files have slightly different syntax from match objects,
e.g. syntax: foo headers, regexp: forms, and re being relre. Put
conversion from hgignore syntax into match syntax into a standalone
function so that it is easier to validate hgignore hunks externally.
2009-07-09 15:14:42 -07:00
Matt Mackall
89c18ad8ce match: add some default args 2009-05-24 02:56:14 -05:00
Matt Mackall
532c58d931 match: change all users of util.matcher to match.match 2009-05-24 02:56:14 -05:00
Simon Heimberg
09ac1e6c92 separate import lines from mercurial and general python modules 2009-04-28 17:40:46 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Dirkjan Ochtman
574603a8c0 use dict.iteritems() rather than dict.items()
This should be faster and more future-proof. Calls where the result is to be
sorted using util.sort() have been left unchanged. Calls to .items() on
configparser objects have been left as-is, too.
2009-01-12 09:16:03 +01:00
Matt Mackall
912ed4360f ignore: fix up comment parsing
- remove redundant newline bits
- change loop to use regex
- eliminate escaping of # in internal representation
2007-12-10 10:26:42 -06:00
Benoit Boissinot
ecc5117277 kill lonely docstring 2007-08-30 23:54:01 +02:00
Thomas Arendsen Hein
c8e49d5f09 Fix re: and glob: patterns in .hgignore (reported by Brad Schick)
relglob: and relre: were already detected for a long time, so
I kept this undocumented functionality, especially as it was already
tested in test-hgignore.
2007-07-30 20:01:16 +02:00
Matt Mackall
38474db3cb dirstate: move ignore to its own file 2007-06-18 13:24:34 -05:00