tests/test-convert-svn-startrev.t
changeset 12370 f98010f57a5e
parent 10200 3373ecddadba
child 13519 43b3b761d9d1
equal deleted inserted replaced
12369:6f0d9d79111f 12370:f98010f57a5e
       
     1 
       
     2   $ "$TESTDIR/hghave" svn svn-bindings || exit 80
       
     3 
       
     4   $ cat > $HGRCPATH <<EOF
       
     5   > [extensions]
       
     6   > convert = 
       
     7   > graphlog =
       
     8   > EOF
       
     9   $ convert()
       
    10   > {
       
    11   >     startrev=$1
       
    12   >     repopath=A-r$startrev-hg
       
    13   >     hg convert --config convert.svn.startrev=$startrev \
       
    14   >         --config convert.svn.trunk=branches/branch1 \
       
    15   >         --config convert.svn.branches="  " \
       
    16   >         --config convert.svn.tags= \
       
    17   >         --datesort svn-repo $repopath
       
    18   >     hg -R $repopath glog \
       
    19   >         --template '{rev} {desc|firstline} files: {files}\n'
       
    20   >     echo
       
    21   > }
       
    22 
       
    23   $ svnadmin create svn-repo
       
    24   $ svnadmin load -q svn-repo < "$TESTDIR/svn/startrev.svndump"
       
    25 
       
    26 Convert before branching point
       
    27 
       
    28   $ convert 3
       
    29   initializing destination A-r3-hg repository
       
    30   scanning source...
       
    31   sorting...
       
    32   converting...
       
    33   3 removeb
       
    34   2 changeaa
       
    35   1 branch, changeaaa
       
    36   0 addc,changeaaaa
       
    37   o  3 addc,changeaaaa files: a c
       
    38   |
       
    39   o  2 branch, changeaaa files: a
       
    40   |
       
    41   o  1 changeaa files: a
       
    42   |
       
    43   o  0 removeb files: a
       
    44   
       
    45   
       
    46 
       
    47 Convert before branching point
       
    48 
       
    49   $ convert 4
       
    50   initializing destination A-r4-hg repository
       
    51   scanning source...
       
    52   sorting...
       
    53   converting...
       
    54   2 changeaa
       
    55   1 branch, changeaaa
       
    56   0 addc,changeaaaa
       
    57   o  2 addc,changeaaaa files: a c
       
    58   |
       
    59   o  1 branch, changeaaa files: a
       
    60   |
       
    61   o  0 changeaa files: a
       
    62   
       
    63   
       
    64 
       
    65 Convert at branching point
       
    66 
       
    67   $ convert 5
       
    68   initializing destination A-r5-hg repository
       
    69   scanning source...
       
    70   sorting...
       
    71   converting...
       
    72   1 branch, changeaaa
       
    73   0 addc,changeaaaa
       
    74   o  1 addc,changeaaaa files: a c
       
    75   |
       
    76   o  0 branch, changeaaa files: a
       
    77   
       
    78   
       
    79 
       
    80 Convert last revision only
       
    81 
       
    82   $ convert 6
       
    83   initializing destination A-r6-hg repository
       
    84   scanning source...
       
    85   sorting...
       
    86   converting...
       
    87   0 addc,changeaaaa
       
    88   o  0 addc,changeaaaa files: a c
       
    89   
       
    90