# HG changeset patch # User Alexander Solovyov # Date 1225963869 -3600 # Node ID 98408cb7413784efc21dccfc84b2c52f6d83e5c9 # Parent 9737041646bc07067f30e4aa19e4a5bfd0e01359 bookmarks: Test if rebase works with bookmarks Add a test that tests if rebase works fine with bookmarks. diff -r 9737041646bc -r 98408cb74137 tests/test-bookmarks-rebase --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-bookmarks-rebase Thu Nov 06 10:31:09 2008 +0100 @@ -0,0 +1,38 @@ +#!/bin/sh + +echo "[extensions]" >> $HGRCPATH +echo "rebase=" >> $HGRCPATH +echo "bookmarks=" >> $HGRCPATH + +cleanoutput () { + sed -e 's/\(Rebase status stored to\).*/\1/' \ + -e 's/\(Rebase status restored from\).*/\1/' \ + -e 's/\(saving bundle to \).*/\1/' +} + +echo % initialize repository +hg init + +echo 'a' > a +hg ci -A -d '0 0' -u test -m "0" + +echo 'b' > b +hg ci -A -d '0 0' -u test -m "1" + +hg up 0 +echo 'c' > c +hg ci -A -d '0 0' -u test -m "2" + +echo 'd' > d +hg ci -A -d '0 0' -u test -m "3" + +hg bookmark -r 1 one +hg bookmark -r 3 two + +echo % bookmark list +hg bookmark + +echo % rebase +hg rebase -s two -d one 2>&1 | cleanoutput + +hg log \ No newline at end of file diff -r 9737041646bc -r 98408cb74137 tests/test-bookmarks-rebase.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-bookmarks-rebase.out Thu Nov 06 10:31:09 2008 +0100 @@ -0,0 +1,42 @@ +% initialize repository +adding a +adding b +0 files updated, 0 files merged, 1 files removed, 0 files unresolved +adding c +created new head +adding d +% bookmark list + * two 3:2ae46b1d99a7 + one 1:925d80f479bb +% rebase +saving bundle to +adding branch +adding changesets +adding manifests +adding file changes +added 1 changesets with 1 changes to 1 files (-1 heads) +rebase completed +changeset: 3:9163974d1cb5 +tag: tip +parent: 1:925d80f479bb +parent: 2:db815d6d32e6 +user: test +date: Thu Jan 01 00:00:00 1970 +0000 +summary: 3 + +changeset: 2:db815d6d32e6 +parent: 0:f7b1eb17ad24 +user: test +date: Thu Jan 01 00:00:00 1970 +0000 +summary: 2 + +changeset: 1:925d80f479bb +user: test +date: Thu Jan 01 00:00:00 1970 +0000 +summary: 1 + +changeset: 0:f7b1eb17ad24 +user: test +date: Thu Jan 01 00:00:00 1970 +0000 +summary: 0 +