From e01b22ab71f167bf448d3e108b360466393bcaae Mon Sep 17 00:00:00 2001 From: Ilya Shakhat Date: Thu, 17 Oct 2013 14:57:01 +0400 Subject: [PATCH] Strip git remote uri before processing Part of bug 1240852 Change-Id: I6cbe0e708e77b82214a5c85b8adac96106d4ec96 --- stackalytics/processor/vcs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stackalytics/processor/vcs.py b/stackalytics/processor/vcs.py index df755b812..810d0c25a 100644 --- a/stackalytics/processor/vcs.py +++ b/stackalytics/processor/vcs.py @@ -105,8 +105,10 @@ class Git(Vcs): if os.path.exists(self.folder): os.chdir(self.folder) - uri = str(sh.git('config', '--get', 'remote.origin.url')) + uri = str(sh.git('config', '--get', 'remote.origin.url')).strip() if uri != self.repo['uri']: + LOG.debug('Repo uri %(uri)s differs from cloned %(old)s', + {'uri': self.repo['uri'], 'old': uri}) os.chdir('..') shutil.rmtree(self.folder)