File: test-convert-svn-startrev

package info (click to toggle)
mercurial 1.6.4-1%2Bdeb6u1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 17,928 kB
  • ctags: 6,062
  • sloc: python: 44,238; sh: 20,985; tcl: 3,578; ansic: 2,557; lisp: 1,412; makefile: 176; xml: 15
file content (32 lines) | stat: -rwxr-xr-x 815 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

"$TESTDIR/hghave" svn svn-bindings || exit 80

echo "[extensions]" >> $HGRCPATH
echo "convert = " >> $HGRCPATH
echo "graphlog =" >> $HGRCPATH

svnadmin create svn-repo
cat "$TESTDIR/svn/startrev.svndump" | svnadmin load svn-repo > /dev/null

convert()
{
    startrev=$1
    repopath=A-r$startrev-hg
    hg convert --config convert.svn.startrev=$startrev \
        --config convert.svn.trunk=branches/branch1 \
        --config convert.svn.branches="  " \
        --config convert.svn.tags= \
        --datesort svn-repo $repopath
    hg -R $repopath glog --template '{rev} {desc|firstline} files: {files}\n'
    echo
}

echo % convert before branching point
convert 3
echo % convert before branching point
convert 4
echo % convert at branching point
convert 5
echo % convert last revision only
convert 6