Date: Fri, 27 Jul 2018 05:41:19 +0000 (UTC) From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r475413 - in head/devel/bzr-fastimport: . files Message-ID: <201807270541.w6R5fJqU021368@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yuri Date: Fri Jul 27 05:41:19 2018 New Revision: 475413 URL: https://svnweb.freebsd.org/changeset/ports/475413 Log: devel/bzr-fastimport: Fix by adding patches and changing MASTER_SITES Port changes: * Change MASTER_SITES to MASTER_SITE_DEBIAN_POOL (patched upstream) * Add patches from U-Bunt-U * Add NO_ARCH PR: 230021 Submitted by: Radim Kolar <hsn@sendmail.cz> Added: head/devel/bzr-fastimport/files/ head/devel/bzr-fastimport/files/patch-deletion-case (contents, props changed) head/devel/bzr-fastimport/files/patch-disable-known-graph (contents, props changed) Modified: head/devel/bzr-fastimport/Makefile head/devel/bzr-fastimport/distinfo Modified: head/devel/bzr-fastimport/Makefile ============================================================================== --- head/devel/bzr-fastimport/Makefile Fri Jul 27 05:14:51 2018 (r475412) +++ head/devel/bzr-fastimport/Makefile Fri Jul 27 05:41:19 2018 (r475413) @@ -3,9 +3,11 @@ PORTNAME= bzr-fastimport PORTVERSION= 0.13.0 +PORTREVISION= 1 CATEGORIES= devel -MASTER_SITES= http://launchpadlibrarian.net/94774555/ \ - http://www.c-s.li/ports/ +MASTER_SITES= ${MASTER_SITE_DEBIAN_POOL} +DISTNAME= ${PORTNAME}_${PORTVERSION}+bzr361 +EXTRACT_SUFX= .orig.tar.gz MAINTAINER= ports@FreeBSD.org COMMENT= Provide fast loading of revision control data into bzr @@ -18,5 +20,9 @@ RUN_DEPENDS= bzr:devel/bzr \ USES= python:2.7 USE_PYTHON= distutils autoplist +NO_ARCH= yes + +WRKSRC= ${WRKDIR}/${DISTNAME:S/_/-/} +PATCH_STRIP= -p1 .include <bsd.port.mk> Modified: head/devel/bzr-fastimport/distinfo ============================================================================== --- head/devel/bzr-fastimport/distinfo Fri Jul 27 05:14:51 2018 (r475412) +++ head/devel/bzr-fastimport/distinfo Fri Jul 27 05:41:19 2018 (r475413) @@ -1,2 +1,3 @@ -SHA256 (bzr-fastimport-0.13.0.tar.gz) = 5e296dc4ff8e9bf1b6447e81fef41e1217656b43368ee4056a1f024221e009eb -SIZE (bzr-fastimport-0.13.0.tar.gz) = 80255 +TIMESTAMP = 1532446385 +SHA256 (bzr-fastimport_0.13.0+bzr361.orig.tar.gz) = 7d9467175279dd2f7a92638aaeeba9874098db6d6bda2fa127722f449f80326d +SIZE (bzr-fastimport_0.13.0+bzr361.orig.tar.gz) = 81499 Added: head/devel/bzr-fastimport/files/patch-deletion-case ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/bzr-fastimport/files/patch-deletion-case Fri Jul 27 05:41:19 2018 (r475413) @@ -0,0 +1,66 @@ +Description: Fix a case where deleteion of an entry in a renamed directory is not reproduced + correctly in fast-export. Thanks to Harry Hirsch, Nuno Araujo, and Andrew Huff for the patch. +Bugs: https://launchpad.net/bugs/430347 https://launchpad.net/bugs/1167690 https://launchpad.net/bugs/1014291 + +=== modified file 'exporter.py' +--- a/exporter.py 2014-05-15 09:26:03 +0000 ++++ b/exporter.py 2015-05-04 13:08:57 +0000 +@@ -514,6 +514,7 @@ + # + # 1) bzr rm a; bzr mv b a; bzr commit + # 2) bzr mv x/y z; bzr rm x; commmit ++ # 3) bzr mv x y; bzr rm y/z; bzr commit + # + # The first must come out with the delete first like this: + # +@@ -525,6 +526,11 @@ + # R x/y z + # D x + # ++ # The third case must come out with delete first like this: ++ # ++ # D x/z ++ # R x y ++ # + # So outputting all deletes first or all renames first won't work. + # Instead, we need to make multiple passes over the various lists to + # get the ordering right. +@@ -532,6 +538,7 @@ + must_be_renamed = {} + old_to_new = {} + deleted_paths = set([p for p, _, _ in deletes]) ++ deleted_child_paths = set() + for (oldpath, newpath, id_, kind, + text_modified, meta_modified) in renames: + emit = kind != 'directory' or not self.plain_format +@@ -543,6 +550,20 @@ + self.note("Skipping empty dir %s in rev %s" % (oldpath, + revision_id)) + continue ++ ++ if kind == 'directory': ++ # handling deleted children in renamed directory (case 3 above) ++ for p, e in tree_old.inventory.iter_entries_by_dir(from_dir=id_): ++ if e.kind == 'directory' or not self.plain_format: ++ continue ++ old_child_path = osutils.pathjoin(oldpath, p) ++ new_child_path = osutils.pathjoin(newpath, p) ++ if old_child_path in deleted_paths: ++ file_cmds.append(commands.FileDeleteCommand(old_child_path.encode("utf-8"))) ++ deleted_paths.remove(old_child_path) ++ deleted_child_paths.add(old_child_path) ++ ++ + #oldpath = self._adjust_path_for_renames(oldpath, renamed, + # revision_id) + renamed.append([oldpath, newpath]) +@@ -561,6 +582,8 @@ + continue + old_child_path = osutils.pathjoin(oldpath, p) + new_child_path = osutils.pathjoin(newpath, p) ++ if old_child_path in deleted_child_paths: ++ continue + must_be_renamed[old_child_path] = new_child_path + + # Add children not already renamed + Added: head/devel/bzr-fastimport/files/patch-disable-known-graph ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/bzr-fastimport/files/patch-disable-known-graph Fri Jul 27 05:41:19 2018 (r475413) @@ -0,0 +1,19 @@ +Description: Disable know graph feature. + repo.get_known_graph_ancestry() can't be called while in the middle of a write + group. Otherwise bzr will crash with: 'BTreeBuilder' object has no attribute + '_find_ancestors'. +Author: Felipe Contreras <felipe.contreras@gmail.com> +Bug: https://launchpad.net/bugs/541626 +Bug-Ubuntu: https://launchpad.net/bugs/541626 + +--- a/revision_store.py ++++ b/revision_store.py +@@ -170,7 +170,7 @@ + """ + self.repo = repo + self._graph = None +- self._use_known_graph = True ++ self._use_known_graph = False + self._supports_chks = getattr(repo._format, 'supports_chks', False) + + def expects_rich_root(self):
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807270541.w6R5fJqU021368>