From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 37EAA138CD0 for ; Thu, 21 May 2015 21:40:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 13410E08C0; Thu, 21 May 2015 21:40:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BFE98E08C0 for ; Thu, 21 May 2015 21:40:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EC7E1340E8C for ; Thu, 21 May 2015 21:40:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EC7139C8 for ; Thu, 21 May 2015 21:40:05 +0000 (UTC) From: "Magnus Granberg" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Magnus Granberg" Message-ID: <1432244372.186092d7da925bf1a5c59d41510e3029632ca23a.zorry@gentoo> Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: tbc/pym/ X-VCS-Repository: proj/tinderbox-cluster X-VCS-Files: tbc/pym/sync.py X-VCS-Directories: tbc/pym/ X-VCS-Committer: zorry X-VCS-Committer-Name: Magnus Granberg X-VCS-Revision: 186092d7da925bf1a5c59d41510e3029632ca23a X-VCS-Branch: master Date: Thu, 21 May 2015 21:40:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fa3f8315-a973-478f-9ec6-f459456130de X-Archives-Hash: 20983fba2ca97e2bf1fcea6cc0d61111 commit: 186092d7da925bf1a5c59d41510e3029632ca23a Author: Magnus Granberg gentoo org> AuthorDate: Thu May 21 21:39:32 2015 +0000 Commit: Magnus Granberg gentoo org> CommitDate: Thu May 21 21:39:32 2015 +0000 URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=186092d7 Fix the regex for cp dict tbc/pym/sync.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tbc/pym/sync.py b/tbc/pym/sync.py index f9e4cda..6dab7f3 100644 --- a/tbc/pym/sync.py +++ b/tbc/pym/sync.py @@ -7,6 +7,7 @@ import os import errno import sys import time +import re from pygit2 import Repository, GIT_MERGE_ANALYSIS_FASTFORWARD, GIT_MERGE_ANALYSIS_NORMAL, \ GIT_MERGE_ANALYSIS_UP_TO_DATE @@ -104,9 +105,10 @@ def git_sync_main(session): reponame = myportdb.getRepositoryName(repo_dir) for diff_line in repo_diff.patch.splitlines(): if re.search("Manifest", diff_line) and re.search("^diff --git", diff_line): - diff_line2 = re.split(' ', re.sub('[a-b]/', '', re.sub('diff --git ', '', diff_line))) - if diff_line2[0] == diff_line2[1] or "Manifest" in diff_line2[0]: - cp = re.sub('/Manifest', '', diff_line2[0]) + diff_line2 = re.split(' b/', re.sub('diff --git', '', diff_line)) + diff_line3 = re.sub(' a/', '', diff_line2[0]) + if diff_line3 == diff_line2[1] or "Manifest" in diff_line3: + cp = re.sub('/Manifest', '', diff_line3) cp_list.append(cp) else: cp = re.sub('/Manifest', '', diff_line2[1])