Ticket #12058: 12058_hgplain.patch

File 12058_hgplain.patch, 4.6 KB (added by jdemeyer, 8 years ago)
  • sage-bdist

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1321790097 -3600
    # Node ID 9d15e76fafc9a94ed2efd9310a275dd032b0984c
    # Parent  da0327650f46df7d9c3209ffa690b7003f809987
    Always use HGPLAIN, except when running "sage -hg" directly
    
    diff --git a/sage-bdist b/sage-bdist
    a b  
    4141cd "$SAGE_ROOT"
    4242
    4343echo "Copying root repository..."
    44 "$SAGE_ROOT"/sage --hg clone --pull . "$TMP"
     44hg clone --pull . "$TMP"
    4545
    4646if [ $? -ne 0 ]; then
    4747    echo "Error copying Sage root repository."
  • sage-combinat

    diff --git a/sage-combinat b/sage-combinat
    a b  
    262262##############################################################################
    263263
    264264sage         = options.sage
    265 hg           = sage+""" -hg --config 'extensions.hgext.mq=' --config 'ui.username="sage-combinat script"'"""
     265hg           = """hg --config 'extensions.hgext.mq=' --config 'ui.username="sage-combinat script"'"""
    266266sage_root    = get_sage_root()
    267267sage_version = get_sage_version()
    268268
  • sage-env

    diff --git a/sage-env b/sage-env
    a b  
    168168# See Trac Ticket #11830
    169169HGENCODING="utf8" && export HGENCODING
    170170
     171# Make Mercurial not use any user defaults (like enabling the pager extension)
     172# This is needed in order to use mercurial in scripts.  When running hg
     173# directly through "sage -hg", we will disable HGPLAIN in sage-sage.
     174# See Trac Ticket #12058
     175HGPLAIN="yes" && export HGPLAIN
     176
    171177SINGULARPATH="$SAGE_LOCAL/share/singular" && export SINGULARPATH
    172178SINGULAR_EXECUTABLE="$SAGE_LOCAL/bin/Singular" && export SINGULAR_EXECUTABLE
    173179
  • sage-make_devel_packages

    diff --git a/sage-make_devel_packages b/sage-make_devel_packages
    a b  
    145145cd "$ROOT_REPO"
    146146
    147147echo "Copying root repository..."
    148 "$SAGE_ROOT"/sage --hg clone --pull "$SAGE_ROOT" .
     148hg clone --pull "$SAGE_ROOT" .
    149149
    150150if [ $? -ne 0 ]; then
    151151    echo "Error copying Sage root repository."
  • sage-pkg

    diff --git a/sage-pkg b/sage-pkg
    a b  
    9191    else:
    9292        spkg_txt = "File is missing"
    9393
    94     p = Popen("cd %s; sage --hg diff" % dir, shell=True, stdout=PIPE, stderr=PIPE)
     94    p = Popen("cd '%s' && hg diff" % dir, shell=True, stdout=PIPE, stderr=PIPE)
    9595    std_out, std_err = p.communicate()
    9696    if len(std_err) != 0:
    9797        hgrepo_txt = "Error reading repository"
  • sage-pull

    diff --git a/sage-pull b/sage-pull
    a b  
    11#!/bin/sh
    2 sage -hg pull http://www.sagemath.org/hg/scripts-main
     2hg pull http://www.sagemath.org/hg/scripts-main
  • sage-sage

    diff --git a/sage-sage b/sage-sage
    a b  
    542542if [ "$1" = '-hg'  -o "$1" = '--hg' ]; then
    543543    cd "$CUR"
    544544    shift
     545    # Disable HGPLAIN, so we use all user defaults
     546    # (both in $SAGE_LOCAL/etc/mercurial and $HOME/.hgrc)
     547    unset HGPLAIN
    545548    "$SAGE_LOCAL/bin/hg" "$@"
    546549    exit $?
    547550fi
  • sage-sdist

    diff --git a/sage-sdist b/sage-sdist
    a b  
    8484hg commit -m "$SAGE_VERSION"
    8585
    8686echo "Copying root repository..."
    87 "$SAGE_ROOT"/sage --hg clone --pull . "$TMP"
     87hg clone --pull . "$TMP"
    8888
    8989if [ $? -ne 0 ]; then
    9090    echo "Error copying Sage root repository."
  • sage-test-new

    diff --git a/sage-test-new b/sage-test-new
    a b  
    77
    88os.chdir('%s/devel/sage'%os.environ['SAGE_ROOT'])
    99
    10 v = os.popen('sage -hg status').read()
     10v = os.popen('hg status').read()
    1111print v
    1212F = []
    1313for X in v.split('\n'):
  • sage-update

    diff --git a/sage-update b/sage-update
    a b  
    347347    # check sage root repo.  if present, check status; if there are
    348348    # any unchecked in changes, abort.
    349349    os.chdir(SAGE_ROOT)
    350     err = subprocess.call('./sage -hg verify', shell=True,
     350    err = subprocess.call('hg verify', shell=True,
    351351                          stdout=subprocess.PIPE,
    352352                          stderr=subprocess.PIPE)
    353353    root_repo_intact = (err == 0)
    354354    if root_repo_intact:
    355         P = subprocess.Popen('./sage -hg status', shell=True,
     355        P = subprocess.Popen('hg status', shell=True,
    356356                             stdout=subprocess.PIPE)
    357357        output = P.communicate()[0]
    358358        if len(output) > 0: # uncommitted changes
     
    410410        for file in ['spkg/install',
    411411                     'spkg/standard/deps',
    412412                     'spkg/standard/newest_version']:
    413             subprocess.call('./sage -hg commit %s -m ' % file +
     413            subprocess.call('hg commit %s -m ' % file +
    414414                            '"committing %s while running sage-update" ' % file +
    415415                            '-u "Sage (during sage -upgrade)"',
    416416                            shell=True)