Mercurial > hg
comparison tests/test-rebase-parameters @ 11198:b345b1cc124f
rebase: use helpers.sh in tests
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 19 May 2010 20:20:12 -0500 |
parents | 8766fee6f225 |
children | 2313dc4d9817 |
comparison
equal
deleted
inserted
replaced
11197:4bb4895e1693 | 11198:b345b1cc124f |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | |
3 source $TESTDIR/helpers.sh | |
2 | 4 |
3 echo "[extensions]" >> $HGRCPATH | 5 echo "[extensions]" >> $HGRCPATH |
4 echo "rebase=" >> $HGRCPATH | 6 echo "rebase=" >> $HGRCPATH |
5 | 7 |
6 addcommit () { | 8 addcommit () { |
60 echo "% ----------" | 62 echo "% ----------" |
61 echo "% These work" | 63 echo "% These work" |
62 echo | 64 echo |
63 echo "% Rebase with no arguments (from 3 onto 7)" | 65 echo "% Rebase with no arguments (from 3 onto 7)" |
64 hg update -C 5 | 66 hg update -C 5 |
65 hg rebase 2>&1 | sed 's/\(saving bundle to \).*/\1/' | 67 hg rebase 2>&1 | hidebackup |
66 | 68 |
67 echo "% Try to rollback after a rebase (fail)" | 69 echo "% Try to rollback after a rebase (fail)" |
68 hg rollback | 70 hg rollback |
69 | 71 |
70 createrepo > /dev/null 2>&1 | 72 createrepo > /dev/null 2>&1 |
71 echo | 73 echo |
72 echo "% Rebase with base == '.' => same as no arguments (from 3 onto 7)" | 74 echo "% Rebase with base == '.' => same as no arguments (from 3 onto 7)" |
73 hg update -C 5 | 75 hg update -C 5 |
74 hg rebase --base . 2>&1 | sed 's/\(saving bundle to \).*/\1/' | 76 hg rebase --base . | hidebackup |
75 | 77 |
76 createrepo > /dev/null 2>&1 | 78 createrepo > /dev/null 2>&1 |
77 echo | 79 echo |
78 echo "% Rebase with dest == `hg branch` => same as no arguments (from 3 onto 7)" | 80 echo "% Rebase with dest == `hg branch` => same as no arguments (from 3 onto 7)" |
79 hg update -C 5 | 81 hg update -C 5 |
80 hg rebase --dest `hg branch` 2>&1 | sed 's/\(saving bundle to \).*/\1/' | 82 hg rebase --dest `hg branch` | hidebackup |
81 | 83 |
82 createrepo > /dev/null 2>&1 | 84 createrepo > /dev/null 2>&1 |
83 echo | 85 echo |
84 echo "% Specify only source (from 4 onto 7)" | 86 echo "% Specify only source (from 4 onto 7)" |
85 hg rebase --source 4 2>&1 | sed 's/\(saving bundle to \).*/\1/' | 87 hg rebase --source 4 | hidebackup |
86 | 88 |
87 createrepo > /dev/null 2>&1 | 89 createrepo > /dev/null 2>&1 |
88 echo | 90 echo |
89 echo "% Specify only dest (from 3 onto 6)" | 91 echo "% Specify only dest (from 3 onto 6)" |
90 hg update -C 5 | 92 hg update -C 5 |
91 hg rebase --dest 6 2>&1 | sed 's/\(saving bundle to \).*/\1/' | 93 hg rebase --dest 6 | hidebackup |
92 | 94 |
93 createrepo > /dev/null 2>&1 | 95 createrepo > /dev/null 2>&1 |
94 echo | 96 echo |
95 echo "% Specify only base (from 3 onto 7)" | 97 echo "% Specify only base (from 3 onto 7)" |
96 hg rebase --base 5 2>&1 | sed 's/\(saving bundle to \).*/\1/' | 98 hg rebase --base 5 | hidebackup |
97 | 99 |
98 createrepo > /dev/null 2>&1 | 100 createrepo > /dev/null 2>&1 |
99 echo | 101 echo |
100 echo "% Specify source and dest (from 4 onto 6)" | 102 echo "% Specify source and dest (from 4 onto 6)" |
101 hg rebase --source 4 --dest 6 2>&1 | sed 's/\(saving bundle to \).*/\1/' | 103 hg rebase --source 4 --dest 6 | hidebackup |
102 | 104 |
103 createrepo > /dev/null 2>&1 | 105 createrepo > /dev/null 2>&1 |
104 echo | 106 echo |
105 echo "% Specify base and dest (from 3 onto 6)" | 107 echo "% Specify base and dest (from 3 onto 6)" |
106 hg rebase --base 4 --dest 6 2>&1 | sed 's/\(saving bundle to \).*/\1/' | 108 hg rebase --base 4 --dest 6 | hidebackup |
107 | 109 |
108 exit 0 | 110 exit 0 |