|
Line 0
Link Here
|
|
|
1 |
From 63312517680e285e8d7cfaf8154fca059a35e4ee Mon Sep 17 00:00:00 2001 |
| 2 |
From: Siddharth Agarwal <sid0@fb.com> |
| 3 |
Date: Fri, 3 Apr 2015 10:27:04 -0700 |
| 4 |
Subject: [PATCH] gitdirstate: use normalized path from _walkexplicit |
| 5 |
|
| 6 |
Since 2bb13f2b778c in Mercurial, _walkexplicit returns a tuple, so ensure |
| 7 |
we are up to date and take the normalized path which is the first part of the |
| 8 |
tuple. |
| 9 |
|
| 10 |
Based on a patch by David Soria Parra <davidsp@fb.com>. |
| 11 |
--- |
| 12 |
hggit/gitdirstate.py | 6 +++++- |
| 13 |
1 file changed, 5 insertions(+), 1 deletion(-) |
| 14 |
|
| 15 |
diff --git a/hggit/gitdirstate.py b/hggit/gitdirstate.py |
| 16 |
index 2cf1e34..4d8cdf4 100644 |
| 17 |
--- a/hggit/gitdirstate.py |
| 18 |
+++ b/hggit/gitdirstate.py |
| 19 |
@@ -163,7 +163,11 @@ def fwarn(f, msg): |
| 20 |
results, work, dirsnotfound = self._walkexplicit(match, subrepos) |
| 21 |
|
| 22 |
skipstep3 = skipstep3 and not (work or dirsnotfound) |
| 23 |
- work = [d for d in work if not dirignore(d)] |
| 24 |
+ if work and isinstance(work[0], tuple): |
| 25 |
+ # Mercurial >= 3.3.3 |
| 26 |
+ work = [nd for nd, d in work if not dirignore(d)] |
| 27 |
+ else: |
| 28 |
+ work = [d for d in work if not dirignore(d)] |
| 29 |
wadd = work.append |
| 30 |
|
| 31 |
# step 2: visit subdirectories |