Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hg.py @ 911:d46af8e6b858
Fix .hgignore parsing if last line has no EOL, ignore trailing white space.
(and don't use tabs in python code)
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 15 Aug 2005 08:08:11 +0100 |
parents | 71be6dd282d1 |
children | 1458d20df2a8 |
comparison
equal
deleted
inserted
replaced
910:891b6a262c4b | 911:d46af8e6b858 |
---|---|
309 if not self.ignorefunc: | 309 if not self.ignorefunc: |
310 bigpat = [] | 310 bigpat = [] |
311 try: | 311 try: |
312 l = file(self.wjoin(".hgignore")) | 312 l = file(self.wjoin(".hgignore")) |
313 for pat in l: | 313 for pat in l: |
314 if pat != "\n": | 314 p = pat.rstrip() |
315 p = pat[:-1] | 315 if p: |
316 try: | 316 try: |
317 re.compile(p) | 317 re.compile(p) |
318 except: | 318 except: |
319 self.ui.warn("ignoring invalid ignore" | 319 self.ui.warn("ignoring invalid ignore" |
320 + " regular expression '%s'\n" % p) | 320 + " regular expression '%s'\n" % p) |