view tests/test-globalopts @ 5377:756a43a30e34

convert: readd --filemap To handle merges correctly, this revision adds a filemap_source class that wraps a converter_source and does the work necessary to calculate the subgraph we're interested in. The wrapped converter_source must provide a new getchangedfiles method that, given a revision rev, and an index N, returns the list of files that are different in rev and its Nth parent. The implementation depends on the ability to skip some revisions and to change the parents field of the commit objects that we returned earlier. To make the conversion restartable, we assume the revisons in the revmapfile are topologically sorted.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Thu, 04 Oct 2007 23:21:37 -0300
parents 9ac493f12901
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
hg merge

cd ..

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

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

echo "%% earlygetopt with duplicate options (36d23de02da1)"
hg --cwd a --cwd b --cwd c tip
hg --repo c --repository b -R a tip

echo "%% earlygetopt short option without following space"
hg -q -Rb tip

echo "%% earlygetopt with illegal abbreviations"
hg --confi "foo.bar=baz"
hg --cw a tip
hg --rep a tip
hg --repositor a tip
hg -qR a tip
hg -qRa 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 quuxfoo > /dev/null && 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 [^)]*/version xxx/'

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

echo %% not tested: --debugger