Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Feb 2018 22:59:37 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r462649 - in head/devel/hg-git: . files
Message-ID:  <201802222259.w1MMxbhh096642@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Thu Feb 22 22:59:37 2018
New Revision: 462649
URL: https://svnweb.freebsd.org/changeset/ports/462649

Log:
  devel/hg-git: unbreak with mercurial 4.5
  
  https://bitbucket.org/durin42/hg-git/issues/235/incompatible-with-mercurial-45
  
  Obtained from:	upstream
  Approved by:	portmgr blanket (after r460748)

Added:
  head/devel/hg-git/files/
  head/devel/hg-git/files/patch-mercurial-4.5   (contents, props changed)
Modified:
  head/devel/hg-git/Makefile   (contents, props changed)

Modified: head/devel/hg-git/Makefile
==============================================================================
--- head/devel/hg-git/Makefile	Thu Feb 22 22:45:13 2018	(r462648)
+++ head/devel/hg-git/Makefile	Thu Feb 22 22:59:37 2018	(r462649)
@@ -3,6 +3,7 @@
 
 PORTNAME=	hg-git
 DISTVERSION=	0.8.10
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	http://bitbucket.org/durin42/${PORTNAME}/get/
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

Added: head/devel/hg-git/files/patch-mercurial-4.5
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/hg-git/files/patch-mercurial-4.5	Thu Feb 22 22:59:37 2018	(r462649)
@@ -0,0 +1,83 @@
+https://bitbucket.org/durin42/hg-git/commits/843f409526fb
+https://bitbucket.org/durin42/hg-git/commits/89303af1c4aa
+https://bitbucket.org/durin42/hg-git/commits/bb255eaf3d14
+
+--- Makefile.orig	2017-11-02 01:23:50 UTC
++++ Makefile
+@@ -33,6 +33,7 @@ tests-%:
+ 
+ all-version-tests: tests-2.8.2 tests-2.9.2 tests-3.0.2 tests-3.1.2 tests-3.2.4 \
+   tests-3.3.3 tests-3.4.2 tests-3.5.2 tests-3.6.3 tests-3.7.3 tests-3.8.4 \
+-  tests-3.9.2 tests-4.0.2 tests-4.1.3 tests-4.2.3 tests-4.3.3 tests-4.4 tests-@
++  tests-3.9.2 tests-4.0.2 tests-4.1.3 tests-4.2.3 tests-4.3.3 tests-4.4.2 \
++  tests-4.5 tests-@
+ 
+ .PHONY: tests all-version-tests
+--- hggit/__init__.py.orig	2017-11-02 01:23:50 UTC
++++ hggit/__init__.py
+@@ -81,7 +81,7 @@ demandimport.ignore.extend([
+ __version__ = '0.8.10'
+ 
+ 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'
+-              '3.8.4 3.9.2 4.0.2 4.1.3 4.2.3 4.3.3 4.4')
++              '3.8.4 3.9.2 4.0.2 4.1.3 4.2.3 4.3.3 4.4.2 4.5')
+ buglink = 'https://bitbucket.org/durin42/hg-git/issues'
+ 
+ cmdtable = {}
+--- hggit/git_handler.py.orig	2017-11-02 01:23:50 UTC
++++ hggit/git_handler.py
+@@ -954,16 +954,22 @@ class GitHandler(object):
+                 if copied:
+                     copied_path = copied[0]
+ 
+-            try:
+-                return context.memfilectx(self.repo, f, data,
+-                                          islink='l' in e,
+-                                          isexec='x' in e,
+-                                          copied=copied_path)
+-            except TypeError:
+-                return context.memfilectx(f, data,
+-                                          islink='l' in e,
+-                                          isexec='x' in e,
+-                                          copied=copied_path)
++            # Different versions of mercurial have different parameters to
++            # memfilectx.  Try them from newest to oldest.
++            args_to_try = (
++                (self.repo, memctx, f, data),   # hg 4.5+
++                (self.repo, f, data),           # hg 3.1 - 4.5
++                (f, data),                      # hg < 3.1
++            )
++            for args in args_to_try:
++                try:
++                    return context.memfilectx(*args,
++                                              islink='l' in e,
++                                              isexec='x' in e,
++                                              copied=copied_path)
++                except TypeError as ex:
++                    last_ex = ex
++            raise last_ex
+ 
+         p1, p2 = (nullid, nullid)
+         octopus = False
+--- tests/test-conflict-1.t.orig	2017-11-02 01:23:50 UTC
++++ tests/test-conflict-1.t
+@@ -19,7 +19,7 @@ Load commonly used test logic
+   $ hg merge -r1 2>&1 | sed 's/-C ./-C/' | egrep -v '^merging afile' | sed 's/incomplete.*/failed!/'
+   warning: conflicts.* (re)
+   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+-  use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
++  use 'hg resolve' to retry unresolved file merges or 'hg *' to abandon (glob)
+ resolve using first parent
+   $ echo C > afile
+   $ hg resolve -m afile | egrep -v 'no more unresolved files' || true
+--- tests/test-conflict-2.t.orig	2017-11-02 01:23:50 UTC
++++ tests/test-conflict-2.t
+@@ -19,7 +19,7 @@ Load commonly used test logic
+   $ hg merge -r1 2>&1 | sed 's/-C ./-C/' | egrep -v '^merging afile' | sed 's/incomplete.*/failed!/'
+   warning: conflicts.* (re)
+   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+-  use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
++  use 'hg resolve' to retry unresolved file merges or 'hg *' to abandon (glob)
+ resolve using second parent
+   $ echo B > afile
+   $ hg resolve -m afile | egrep -v 'no more unresolved files' || true



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802222259.w1MMxbhh096642>