public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Magnus Granberg" <zorry@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: tbc/pym/
Date: Thu, 21 May 2015 21:40:05 +0000 (UTC)	[thread overview]
Message-ID: <1432244372.186092d7da925bf1a5c59d41510e3029632ca23a.zorry@gentoo> (raw)

commit:     186092d7da925bf1a5c59d41510e3029632ca23a
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Thu May 21 21:39:32 2015 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> 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])


             reply	other threads:[~2015-05-21 21:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 21:40 Magnus Granberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-07-24  1:45 [gentoo-commits] proj/tinderbox-cluster:master commit in: tbc/pym/ Magnus Granberg
2015-07-24  1:28 Magnus Granberg
2015-07-24  1:00 Magnus Granberg
2015-07-24  0:26 Magnus Granberg
2015-07-22  6:22 Magnus Granberg
2015-07-21 22:42 Magnus Granberg
2015-07-20 15:46 Magnus Granberg
2015-07-19 11:54 Magnus Granberg
2015-07-15 12:04 Magnus Granberg
2015-06-12 19:31 Magnus Granberg
2015-06-12 19:31 Magnus Granberg
2015-06-12 19:31 Magnus Granberg
2015-06-06 20:06 Magnus Granberg
2015-05-31 21:15 Magnus Granberg
2015-05-31 21:15 Magnus Granberg
2015-05-15 19:00 Magnus Granberg
2015-05-12 18:37 Magnus Granberg
2015-05-09 15:50 Magnus Granberg
2015-04-18 20:27 Magnus Granberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432244372.186092d7da925bf1a5c59d41510e3029632ca23a.zorry@gentoo \
    --to=zorry@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox