hg
author Martin von Zweigbergk <martinvonz@google.com>
Wed, 03 Feb 2016 15:35:23 -0800
changeset 29954 ed94b24a3bb2285c8c421b2389f821f88da82a5d
parent 21812 73e4a02e6d23947e3affa47d204ff68ea7594ae5
child 27268 09e94d0844eaf0e04da57001133dda43f7646193
child 28260 3d32b988b6d49f95d507e456b3e627f27e816ba8
child 31563 2ea9c9aa6e60475ff2338722554fe1f24bfc43c9
permissions -rwxr-xr-x
tests: simplify treemanifest test by backing up entire .hg/store

#!/usr/bin/env python
#
# mercurial - scalable distributed SCM
#
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

import os
import sys

if os.environ.get('HGUNICODEPEDANTRY', False):
    reload(sys)
    sys.setdefaultencoding("undefined")


libdir = '@LIBDIR@'

if libdir != '@' 'LIBDIR' '@':
    if not os.path.isabs(libdir):
        libdir = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                              libdir)
        libdir = os.path.abspath(libdir)
    sys.path.insert(0, libdir)

# enable importing on demand to reduce startup time
try:
    from mercurial import demandimport; demandimport.enable()
except ImportError:
    import sys
    sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" %
                     ' '.join(sys.path))
    sys.stderr.write("(check your install and PYTHONPATH)\n")
    sys.exit(-1)

import mercurial.util
import mercurial.dispatch

for fp in (sys.stdin, sys.stdout, sys.stderr):
    mercurial.util.setbinary(fp)

mercurial.dispatch.run()