mercurial/hg.py
changeset 911 d46af8e6b858
parent 903 71be6dd282d1
child 919 1458d20df2a8
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -311,8 +311,8 @@ class dirstate:
             try:
                 l = file(self.wjoin(".hgignore"))
                 for pat in l:
-                    if pat != "\n":
-			p = pat[:-1]
+                    p = pat.rstrip()
+                    if p:
                         try:
                             re.compile(p)
                         except: