Return-Path: X-Original-To: apmail-gump-commits-archive@www.apache.org Delivered-To: apmail-gump-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DB3CE18A93 for ; Fri, 22 Apr 2016 07:34:34 +0000 (UTC) Received: (qmail 1154 invoked by uid 500); 22 Apr 2016 07:34:34 -0000 Mailing-List: contact commits-help@gump.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@gump.apache.org Delivered-To: mailing list commits@gump.apache.org Received: (qmail 1143 invoked by uid 99); 22 Apr 2016 07:34:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Apr 2016 07:34:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 5E05B180457 for ; Fri, 22 Apr 2016 07:34:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.999 X-Spam-Level: X-Spam-Status: No, score=0.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id BRnDyBeI9Cei for ; Fri, 22 Apr 2016 07:34:31 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTP id 1767E5F2C3 for ; Fri, 22 Apr 2016 07:34:31 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id ED08FE0098 for ; Fri, 22 Apr 2016 07:34:29 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 5A7133A0186 for ; Fri, 22 Apr 2016 07:34:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1740457 - /gump/live/python/gump/core/update/git.py Date: Fri, 22 Apr 2016 07:34:28 -0000 To: commits@gump.apache.org From: kkolinko@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160422073429.5A7133A0186@svn01-us-west.apache.org> Author: kkolinko Date: Fri Apr 22 07:34:28 2016 New Revision: 1740457 URL: http://svn.apache.org/viewvc?rev=1740457&view=rev Log: Revert r1740429, as planned. Gump is running successfully. Modified: gump/live/python/gump/core/update/git.py Modified: gump/live/python/gump/core/update/git.py URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/update/git.py?rev=1740457&r1=1740456&r2=1740457&view=diff ============================================================================== --- gump/live/python/gump/core/update/git.py (original) +++ gump/live/python/gump/core/update/git.py Fri Apr 22 07:34:28 2016 @@ -106,28 +106,25 @@ class GitUpdater(ScmUpdater): Run git branch and git config remote.origin.url to see whether the branch and URL match """ - return (False, 'Unconditionally forcing a fresh working copy. This is a temporary solution to clean stale checkouts and to update configuration of git. 2016-04-22.') + cmd = getCmdFromString('git branch', + 'check_workspace_branch_' + module.getName(), + module.getSourceControlStagingDirectory()) + result = execute(cmd) -# -# cmd = getCmdFromString('git branch', -# 'check_workspace_branch_' + module.getName(), -# module.getSourceControlStagingDirectory()) -# result = execute(cmd) -# -# if not result.isOk(): -# return (False, 'git branch returned ' + str(result.exit_code)) -# elif not result.hasOutput(): -# return (False, 'git branch didn\'t return any output.') -# -# current_branch = extract_URL(result, BRANCH_REGEX, 'git branch') -# if module.getScm().getBranch() != current_branch: -# return (False, 'Expected branch \'' + module.getScm().getBranch() \ -# + '\' but working copy was \'' + current_branch + '\'') -# -# return match_workspace_template(module, 'git config remote.origin.url', -# lambda result: -# tailFileToString(result.getOutput(), -# 1).rstrip()) + if not result.isOk(): + return (False, 'git branch returned ' + str(result.exit_code)) + elif not result.hasOutput(): + return (False, 'git branch didn\'t return any output.') + + current_branch = extract_URL(result, BRANCH_REGEX, 'git branch') + if module.getScm().getBranch() != current_branch: + return (False, 'Expected branch \'' + module.getScm().getBranch() \ + + '\' but working copy was \'' + current_branch + '\'') + + return match_workspace_template(module, 'git config remote.origin.url', + lambda result: + tailFileToString(result.getOutput(), + 1).rstrip()) def getPostProcessCommands(self, module, isUpdate): """