View | Details | Raw Unified | Return to bug 199262 | Differences between
and this patch

Collapse All | Expand All

(-)hg-git/Makefile (+1 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	hg-git
4
PORTNAME=	hg-git
5
PORTVERSION=	0.8.0
5
PORTVERSION=	0.8.0
6
PORTREVISION=	1
6
CATEGORIES=	devel python
7
CATEGORIES=	devel python
7
MASTER_SITES=	CHEESESHOP
8
MASTER_SITES=	CHEESESHOP
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
9
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
(-)hg-git/files/63312517680e285e8d7cfaf8154fca059a35e4ee.patch (+31 lines)
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
(-)hg-git/files/patch-hggit_gitdirstate.py (+29 lines)
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
--- hggit/gitdirstate.py.orig	2014-05-09 14:26:29 UTC
16
+++ hggit/gitdirstate.py
17
@@ -161,7 +161,11 @@ class gitdirstate(dirstate.dirstate):
18
         results, work, dirsnotfound = self._walkexplicit(match, subrepos)
19
 
20
         skipstep3 = skipstep3 and not (work or dirsnotfound)
21
-        work = [d for d in work if not dirignore(d)]
22
+        if work and isinstance(work[0], tuple):
23
+            # Mercurial >= 3.3.3
24
+            work = [nd for nd, d in work if not dirignore(d)]
25
+        else:
26
+            work = [d for d in work if not dirignore(d)]
27
         wadd = work.append
28
 
29
         # step 2: visit subdirectories

Return to bug 199262