tests/test-convert-bzr
changeset 8305 7a0fcdd3828f
parent 8165 78658990c725
child 8306 74a1625d11ec
equal deleted inserted replaced
8304:991ca609ccd6 8305:7a0fcdd3828f
    31 cat > filemap <<EOF
    31 cat > filemap <<EOF
    32 exclude a
    32 exclude a
    33 EOF
    33 EOF
    34 hg convert --filemap filemap source source-filemap-hg
    34 hg convert --filemap filemap source source-filemap-hg
    35 hg -R source-filemap-hg manifest -r tip
    35 hg -R source-filemap-hg manifest -r tip
       
    36 
       
    37 # extract timestamps that look just like hg's {date|isodate}:
       
    38 # yyyy-mm-dd HH:MM zzzz (no seconds!)
       
    39 echo "% compare timestamps"
       
    40 cd source
       
    41 bzr log | \
       
    42   awk -F'[ :]' '$1 == "timestamp" { printf "%s %s:%s %s\n", $4, $5, $6, $8 }' \
       
    43   > ../bzr-timestamps
       
    44 cd ..
       
    45 
       
    46 hg -R source-hg log --template "{date|isodate}\n" > hg-timestamps
       
    47 if diff -q bzr-timestamps hg-timestamps ; then
       
    48   echo "good: hg timestamps match bzr timestamps"
       
    49 else
       
    50   echo "fail: bzr timestamps are:"
       
    51   cat bzr-timestamps
       
    52   echo "but hg timestamps are:"
       
    53   cat hg-timestamps
       
    54 fi
       
    55 
    36 cd ..
    56 cd ..
    37 
    57 
    38 echo % merge
    58 echo % merge
    39 mkdir test-merge
    59 mkdir test-merge
    40 cd test-merge
    60 cd test-merge