Fix path handling on Windows

Thomas Arendsen Hein thomas at intevation.de
Mon Aug 15 02:10:51 CDT 2005


* Bryan O'Sullivan <bos at serpentine.com> [20050813 01:15]:
> # HG changeset patch
> # User Bryan O'Sullivan <bos at serpentine.com>
> # Node ID 509de8ab6f31e92c8d85d8d61399f28d9baf512d
> # Parent  087771ebe2e6166fb6001a5f3f229043ae868cd3
> Fix walk path handling on Windows.
> 
> diff -r 087771ebe2e6 -r 509de8ab6f31 mercurial/hg.py
> --- a/mercurial/hg.py	Fri Aug 12 19:16:58 2005
> +++ b/mercurial/hg.py	Fri Aug 12 23:06:52 2005
> @@ -312,14 +312,14 @@
>                  l = file(self.wjoin(".hgignore"))
>                  for pat in l:
>                      if pat != "\n":
> -                        p = util.pconvert(pat[:-1])
> +			p = pat[:-1]
>                          try:

Here are tabs hiding. Additionally this removes the last character
from the last line in .hgignore if it has no EOL.

Fix appended and pullable from me.

Thomas


# HG changeset patch
# User Thomas Arendsen Hein <thomas at intevation.de>
# Node ID d46af8e6b85874a3ef32ddd545536d41d9da1418
# Parent  891b6a262c4bd0ddc770d965ff5c94602c758b7e
Fix .hgignore parsing if last line has no EOL, ignore trailing white space.
(and don't use tabs in python code)

diff -r 891b6a262c4bd0ddc770d965ff5c94602c758b7e -r d46af8e6b85874a3ef32ddd545536d41d9da1418 mercurial/hg.py
--- a/mercurial/hg.py	Mon Aug 15 06:00:16 2005
+++ b/mercurial/hg.py	Mon Aug 15 07:08:11 2005
@@ -311,8 +311,8 @@
             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:


-- 
Email: thomas at intevation.de
http://intevation.de/~thomas/


More information about the Mercurial mailing list