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 BAEBB90EC for ; Sun, 25 Mar 2012 06:02:09 +0000 (UTC) Received: (qmail 91588 invoked by uid 500); 25 Mar 2012 06:02:08 -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 91567 invoked by uid 99); 25 Mar 2012 06:02:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Mar 2012 06:02:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Mar 2012 06:02:06 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7FE3123888EA; Sun, 25 Mar 2012 06:01:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1304980 - /gump/trunk/python/gump/core/update/hg.py Date: Sun, 25 Mar 2012 06:01:46 -0000 To: commits@gump.apache.org From: bodewig@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120325060146.7FE3123888EA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bodewig Date: Sun Mar 25 06:01:44 2012 New Revision: 1304980 URL: http://svn.apache.org/viewvc?rev=1304980&view=rev Log: ask 'hg incoming' whether there are any changes before running 'hg pull' Modified: gump/trunk/python/gump/core/update/hg.py Modified: gump/trunk/python/gump/core/update/hg.py URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/update/hg.py?rev=1304980&r1=1304979&r2=1304980&view=diff ============================================================================== --- gump/trunk/python/gump/core/update/hg.py (original) +++ gump/trunk/python/gump/core/update/hg.py Sun Mar 25 06:01:44 2012 @@ -20,6 +20,7 @@ import re from gump.core.update.scmupdater import extract_URL, log_repository_and_url, \ match_workspace_template, ScmUpdater, should_be_quiet from gump.util.process.command import Cmd +from gump.util.process.launcher import execute def setup_common_parameters(module, cmd): if should_be_quiet(module): @@ -60,6 +61,17 @@ class HgUpdater(ScmUpdater): Build the appropriate hg command for pull """ log_repository_and_url(module, 'hg') + + cmd = Cmd('hg', 'incoming_' + module.getName(), + module.getSourceControlStagingDirectory()) + cmd.addParameter('incoming') + setup_common_parameters(module, cmd) + result = execute(cmd) + if not result.isOk(): + module.addInfo('No updates') + return Cmd('/bin/true', 'update_' + module.getName(), + module.getSourceControlStagingDirectory()) + cmd = Cmd('hg', 'update_' + module.getName(), module.getSourceControlStagingDirectory()) cmd.addParameter('pull')