annotate tests/test-bookmarks-rebase @ 7429:dbc40381620e

tests: Skip tests if they will fail because of outer repo For different reasons these tests will fail if run in a tmpdir which is in a hg repo. The following three tests assumes no .hg in path dirs - I don't know how to work around that: * test-dispatch explicitly tests for no repo and expects "abort: There is no Mercurial repository here (.hg not found)!" * test-extension expects parentui to be None when not cd'ed to a repo dir * test-globalopts tests that implicit -R works correctly - that could perhaps be done from another repo instead of assuming no repo The following two might be worth investigating further: * test-convert-svn-sink fails for unknown reasons, starting with "abort: unresolved merge conflicts (see hg resolve)" * test-glog gets strange failures when testing "from outer space"
author Mads Kiilerich <mads@kiilerich.com>
date Thu, 27 Nov 2008 00:57:31 +0100
parents 98408cb74137
children 6c82beaaa11a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
1 #!/bin/sh
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
2
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
3 echo "[extensions]" >> $HGRCPATH
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
4 echo "rebase=" >> $HGRCPATH
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
5 echo "bookmarks=" >> $HGRCPATH
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
6
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
7 cleanoutput () {
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
8 sed -e 's/\(Rebase status stored to\).*/\1/' \
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
9 -e 's/\(Rebase status restored from\).*/\1/' \
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
10 -e 's/\(saving bundle to \).*/\1/'
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
11 }
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
12
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
13 echo % initialize repository
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
14 hg init
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
15
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
16 echo 'a' > a
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
17 hg ci -A -d '0 0' -u test -m "0"
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
18
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
19 echo 'b' > b
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
20 hg ci -A -d '0 0' -u test -m "1"
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
21
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
22 hg up 0
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
23 echo 'c' > c
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
24 hg ci -A -d '0 0' -u test -m "2"
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
25
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
26 echo 'd' > d
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
27 hg ci -A -d '0 0' -u test -m "3"
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
28
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
29 hg bookmark -r 1 one
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
30 hg bookmark -r 3 two
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
31
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
32 echo % bookmark list
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
33 hg bookmark
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
34
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
35 echo % rebase
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
36 hg rebase -s two -d one 2>&1 | cleanoutput
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
37
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
38 hg log