tests/test-convert-bzr-merges
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
Fri, 07 Nov 2008 10:37:20 +0100
changeset 7325 f9985108d4e4
parent 7058 9e6d6568bf7a
child 7602 d65671beee7f
permissions -rwxr-xr-x
graphlog: split the actual DAG grapher out into a separate method This allows extensions like pbranch to use asciigraph() to graph dependencies for patch branches, but could be used for basically any DAG.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
     1
#!/bin/sh
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
     2
7058
9e6d6568bf7a `source` doesn't work for some /bin/sh, use `.` instead
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 7053
diff changeset
     3
. "$TESTDIR/bzr-definitions"
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
     4
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
     5
echo % test multiple merges at once
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
     6
mkdir test-multimerge
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
     7
cd test-multimerge
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
     8
bzr init -q source
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
     9
cd source
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    10
echo content > file
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    11
bzr add -q file
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    12
bzr commit -q -m 'Initial add'
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    13
cd ..
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    14
bzr branch -q source source-branch1
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    15
cd source-branch1
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    16
echo morecontent >> file
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    17
echo evenmorecontent > file-branch1
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    18
bzr add -q file-branch1
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    19
bzr commit -q -m 'Added branch1 file'
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    20
cd ../source
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    21
echo content > file-parent
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    22
bzr add -q file-parent
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    23
bzr commit -q -m 'Added parent file'
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    24
cd ..
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    25
bzr branch -q source source-branch2
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    26
cd source-branch2
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    27
echo somecontent > file-branch2
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    28
bzr add -q file-branch2
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    29
bzr commit -q -m 'Added brach2 file'
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    30
cd ../source
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    31
bzr merge -q ../source-branch1
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    32
bzr merge -q --force ../source-branch2
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    33
bzr commit -q -m 'Merged branches'
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    34
cd ..
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    35
hg convert --datesort source source-hg
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    36
glog -R source-hg
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    37
manifest source-hg tip