view tests/test-globalopts @ 2328:f789602ba840

hgweb.manifest: revno of manifest and changelog aren't always the same In the v4l-dvb repo, the manifest revno and the changelog revno are not in sync. This happened because the same patch was applied to the same revision in two different branches, resulting in the same manifest text, with the same parents and so the first revision was reused. Since hgweb.manifest was assuming the revnos of the manifest and of the changelog were always the same, clicking on manifest -> bz2 in the v4l-dvb site would download the wrong revision. Use the linkrev to go from manifest revision to changelog revision. This still won't be perfect since the page will still talk about "manifest for changeset XYZ", where XYZ was the first changeset to have this manifest, which is not necessarily the same changeset that the user clicked to get to this page - but at least the contents will be the same.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 20 May 2006 15:34:19 -0300
parents 04a18aaaca25
children
line wrap: on
line source

#!/bin/sh

hg init a
cd a
echo a > a
hg ci -A -d'1 0' -m a

cd ..

hg init b
cd b
echo b > b
hg ci -A -d'1 0' -m b

cd ..

hg clone a c
cd c
hg pull -f ../b
HGMERGE=merge hg merge

cd ..

echo %% -R/--repository
hg -R a tip
hg --repository b tip

echo %% abbrev of long option
hg --repo c tip

echo %% --cwd
hg --cwd a parents

echo %% -y/--noninteractive - just be sure it is parsed
hg --cwd a tip -q --noninteractive
hg --cwd a tip -q -y

echo %% -q/--quiet
hg -R a -q tip
hg -R b -q tip
hg -R c --quiet parents

echo %% -v/--verbose
hg --cwd c head -v
hg --cwd b tip --verbose

echo %% --config
hg --cwd c --config paths.quuxfoo=bar paths | grep -q quuxfoo && echo quuxfoo
hg --cwd c --config '' tip -q
hg --cwd c --config a.b tip -q
hg --cwd c --config a tip -q
hg --cwd c --config a.= tip -q
hg --cwd c --config .b= tip -q

echo %% --debug
hg --cwd c log --debug

echo %% --traceback
hg --cwd c --config x --traceback tip 2>&1 | grep -i 'traceback'

echo %% --time
hg --cwd a --time tip 2>&1 | grep '^Time:' | sed 's/[0-9][0-9]*/x/g'

echo %% --version
hg --version -q | sed 's/version \([a-f0-9+]*\|unknown\)/version xxx/'

echo %% -h/--help
hg -h
hg --help

echo %% not tested: --debugger