##// END OF EJS Templates
subrepo: change default path in hgrc of subrepo after cloning...
subrepo: change default path in hgrc of subrepo after cloning Previous behavior was to put in the cloned subrepos the path found in the original main repo. However it isn't valid for relative path and it seems more logical to reference instead the subrepos working copy path of the original main repo.

File last commit:

r9044:d4d4da54 default
r10378:e1401c74 default
Show More
test-convert-p4
75 lines | 1.7 KiB | text/plain | TextLexer
Frank Kingswood
convert: Perforce source for conversion to Mercurial
r7823 #!/bin/sh
"$TESTDIR/hghave" p4 || exit 80
echo "[extensions]" >> $HGRCPATH
echo "convert = " >> $HGRCPATH
echo % create p4 depot
David Champion
Bourne shells do not maintain $PWD; update tests accordingly
r9044 P4ROOT=`pwd`/depot; export P4ROOT
Brodie Rao
tests: remove more instances of export FOO=bar bashism
r9043 P4AUDIT=$P4ROOT/audit; export P4AUDIT
P4JOURNAL=$P4ROOT/journal; export P4JOURNAL
P4LOG=$P4ROOT/log; export P4LOG
P4PORT=localhost:16661; export P4PORT
P4DEBUG=1; export P4DEBUG
Frank Kingswood
convert: Perforce source for conversion to Mercurial
r7823
echo % start the p4 server
[ ! -d $P4ROOT ] && mkdir $P4ROOT
p4d -f -J off >$P4ROOT/stdout 2>$P4ROOT/stderr &
trap "echo % stop the p4 server ; p4 admin stop" EXIT
# wait for the server to initialize
while ! p4 ; do
sleep 1
done >/dev/null 2>/dev/null
echo % create a client spec
Brodie Rao
tests: remove more instances of export FOO=bar bashism
r9043 P4CLIENT=hg-p4-import; export P4CLIENT
Frank Kingswood
convert: Perforce source for conversion to Mercurial
r7823 DEPOTPATH=//depot/test-mercurial-import/...
p4 client -o | sed '/^View:/,$ d' >p4client
echo View: >>p4client
echo " $DEPOTPATH //$P4CLIENT/..." >>p4client
p4 client -i <p4client
echo % populate the depot
echo a > a
mkdir b
echo c > b/c
p4 add a b/c
p4 submit -d initial
echo % change some files
p4 edit a
echo aa >> a
p4 submit -d "change a"
p4 edit b/c
echo cc >> b/c
p4 submit -d "change b/c"
echo % convert
hg convert -s p4 $DEPOTPATH dst
Martin Geisler
tests: replace #...# syntax with {...}
r8523 hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
Frank Kingswood
convert: Perforce source for conversion to Mercurial
r7823
echo % change some files
p4 edit a b/c
echo aaa >> a
echo ccc >> b/c
p4 submit -d "change a b/c"
echo % convert again
hg convert -s p4 $DEPOTPATH dst
Martin Geisler
tests: replace #...# syntax with {...}
r8523 hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
Frank Kingswood
convert: Perforce source for conversion to Mercurial
r7823
echo % interesting names
echo dddd > "d d"
Patrick Mezard
convert/p4: win32 fixes...
r8063 mkdir " e"
echo fff >" e/ f"
p4 add "d d" " e/ f"
Frank Kingswood
convert: Perforce source for conversion to Mercurial
r7823 p4 submit -d "add d e f"
echo % convert again
hg convert -s p4 $DEPOTPATH dst
Martin Geisler
tests: replace #...# syntax with {...}
r8523 hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
Frank Kingswood
convert: Perforce source for conversion to Mercurial
r7823