View | Details | Raw Unified | Return to bug 233001
Collapse All | Expand All

(-)Makefile (-3 / +2 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	hg-git
4
PORTNAME=	hg-git
5
DISTVERSION=	0.8.10
5
DISTVERSION=	0.8.12
6
PORTREVISION=	1
7
CATEGORIES=	devel python
6
CATEGORIES=	devel python
8
MASTER_SITES=	http://bitbucket.org/durin42/${PORTNAME}/get/
7
MASTER_SITES=	http://bitbucket.org/durin42/${PORTNAME}/get/
9
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
Lines 21-27 RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dulw Link Here
21
PORTDOCS=	README.md
20
PORTDOCS=	README.md
22
21
23
NO_ARCH=	yes
22
NO_ARCH=	yes
24
WRKSRC=		${WRKDIR}/durin42-${PORTNAME}-6ef27582bfa5
23
WRKSRC=		${WRKDIR}/durin42-${PORTNAME}-c651bb6fcf33
25
USES=		python:2.7
24
USES=		python:2.7
26
USE_PYTHON=	distutils autoplist
25
USE_PYTHON=	distutils autoplist
27
26
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1517964609
1
TIMESTAMP = 1541446382
2
SHA256 (hg-git/0.8.10.tar.gz) = 31a81e42f8fd2bed283d8f8f9eae9196aee3b1124dc94cfd1aae545c8fae0f6c
2
SHA256 (hg-git/0.8.12.tar.gz) = 66a589baa5c6734320f2737c486abfabfd9bb2bf96bedbfe991f0a5bec1160d2
3
SIZE (hg-git/0.8.10.tar.gz) = 124879
3
SIZE (hg-git/0.8.12.tar.gz) = 136783
(-)files/patch-mercurial-4.5 (-83 lines)
Lines 1-83 Link Here
1
https://bitbucket.org/durin42/hg-git/commits/843f409526fb
2
https://bitbucket.org/durin42/hg-git/commits/89303af1c4aa
3
https://bitbucket.org/durin42/hg-git/commits/bb255eaf3d14
4
5
--- Makefile.orig	2017-11-02 01:23:50 UTC
6
+++ Makefile
7
@@ -33,6 +33,7 @@ tests-%:
8
 
9
 all-version-tests: tests-2.8.2 tests-2.9.2 tests-3.0.2 tests-3.1.2 tests-3.2.4 \
10
   tests-3.3.3 tests-3.4.2 tests-3.5.2 tests-3.6.3 tests-3.7.3 tests-3.8.4 \
11
-  tests-3.9.2 tests-4.0.2 tests-4.1.3 tests-4.2.3 tests-4.3.3 tests-4.4 tests-@
12
+  tests-3.9.2 tests-4.0.2 tests-4.1.3 tests-4.2.3 tests-4.3.3 tests-4.4.2 \
13
+  tests-4.5 tests-@
14
 
15
 .PHONY: tests all-version-tests
16
--- hggit/__init__.py.orig	2017-11-02 01:23:50 UTC
17
+++ hggit/__init__.py
18
@@ -81,7 +81,7 @@ demandimport.ignore.extend([
19
 __version__ = '0.8.10'
20
 
21
 testedwith = ('2.8.2 2.9.2 3.0.2 3.1.2 3.2.4 3.3.3 3.4.2 3.5.2 3.6.3 3.7.3'
22
-              '3.8.4 3.9.2 4.0.2 4.1.3 4.2.3 4.3.3 4.4')
23
+              '3.8.4 3.9.2 4.0.2 4.1.3 4.2.3 4.3.3 4.4.2 4.5')
24
 buglink = 'https://bitbucket.org/durin42/hg-git/issues'
25
 
26
 cmdtable = {}
27
--- hggit/git_handler.py.orig	2017-11-02 01:23:50 UTC
28
+++ hggit/git_handler.py
29
@@ -954,16 +954,22 @@ class GitHandler(object):
30
                 if copied:
31
                     copied_path = copied[0]
32
 
33
-            try:
34
-                return context.memfilectx(self.repo, f, data,
35
-                                          islink='l' in e,
36
-                                          isexec='x' in e,
37
-                                          copied=copied_path)
38
-            except TypeError:
39
-                return context.memfilectx(f, data,
40
-                                          islink='l' in e,
41
-                                          isexec='x' in e,
42
-                                          copied=copied_path)
43
+            # Different versions of mercurial have different parameters to
44
+            # memfilectx.  Try them from newest to oldest.
45
+            args_to_try = (
46
+                (self.repo, memctx, f, data),   # hg 4.5+
47
+                (self.repo, f, data),           # hg 3.1 - 4.5
48
+                (f, data),                      # hg < 3.1
49
+            )
50
+            for args in args_to_try:
51
+                try:
52
+                    return context.memfilectx(*args,
53
+                                              islink='l' in e,
54
+                                              isexec='x' in e,
55
+                                              copied=copied_path)
56
+                except TypeError as ex:
57
+                    last_ex = ex
58
+            raise last_ex
59
 
60
         p1, p2 = (nullid, nullid)
61
         octopus = False
62
--- tests/test-conflict-1.t.orig	2017-11-02 01:23:50 UTC
63
+++ tests/test-conflict-1.t
64
@@ -19,7 +19,7 @@ Load commonly used test logic
65
   $ hg merge -r1 2>&1 | sed 's/-C ./-C/' | egrep -v '^merging afile' | sed 's/incomplete.*/failed!/'
66
   warning: conflicts.* (re)
67
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
68
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
69
+  use 'hg resolve' to retry unresolved file merges or 'hg *' to abandon (glob)
70
 resolve using first parent
71
   $ echo C > afile
72
   $ hg resolve -m afile | egrep -v 'no more unresolved files' || true
73
--- tests/test-conflict-2.t.orig	2017-11-02 01:23:50 UTC
74
+++ tests/test-conflict-2.t
75
@@ -19,7 +19,7 @@ Load commonly used test logic
76
   $ hg merge -r1 2>&1 | sed 's/-C ./-C/' | egrep -v '^merging afile' | sed 's/incomplete.*/failed!/'
77
   warning: conflicts.* (re)
78
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
79
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
80
+  use 'hg resolve' to retry unresolved file merges or 'hg *' to abandon (glob)
81
 resolve using second parent
82
   $ echo B > afile
83
   $ hg resolve -m afile | egrep -v 'no more unresolved files' || true

Return to bug 233001