tests/test-archive-symlinks.t
author Siddharth Agarwal <sid0@fb.com>
Wed, 19 Feb 2014 21:32:14 -0800
changeset 20541 44dcca9be1d5
parent 16913 f2719b387380
child 21216 6d632cf8a811
permissions -rw-r--r--
run-tests.py: work when --with-hg is set to system hg Previously we'd always assume that --with-hg is a script in a user directory, and would write out a 'python' symlink to the same location. That didn't work if --with-hg was set to a system installation of hg, e.g. /usr/bin/hg. Introduce a TMPBINDIR directory which is used to write out the python symlink.

  $ "$TESTDIR/hghave" symlink || exit 80

  $ origdir=`pwd`

  $ hg init repo
  $ cd repo
  $ ln -s nothing dangling

avoid tar warnings about old timestamp

  $ hg ci -d '2000-01-01 00:00:00 +0000' -qAm 'add symlink'

  $ hg archive -t files ../archive
  $ hg archive -t tar -p tar ../archive.tar
  $ hg archive -t zip -p zip ../archive.zip

files

  $ cd "$origdir"
  $ cd archive
  $ "$TESTDIR/readlink.py" dangling
  dangling -> nothing

tar

  $ cd "$origdir"
  $ tar xf archive.tar
  $ cd tar
  $ "$TESTDIR/readlink.py" dangling
  dangling -> nothing

zip

  $ cd "$origdir"
  $ unzip archive.zip > /dev/null
  $ cd zip
  $ "$TESTDIR/readlink.py" dangling
  dangling -> nothing

  $ cd ..