Mercurial > hg
changeset 11909:deea0506528c
Merge with mpm
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Mon, 16 Aug 2010 20:33:58 +0200 |
parents | 7f48f0b188c6 (diff) 0b84864d1325 (current diff) |
children | 2afefc01259e |
files | tests/test-keyword tests/test-keyword.out |
diffstat | 9 files changed, 483 insertions(+), 476 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-bookmarks-rebase.t Sun Aug 15 13:26:12 2010 -0500 +++ b/tests/test-bookmarks-rebase.t Mon Aug 16 20:33:58 2010 +0200 @@ -1,5 +1,3 @@ - $ . $TESTDIR/helpers.sh - $ echo "[extensions]" >> $HGRCPATH $ echo "rebase=" >> $HGRCPATH $ echo "bookmarks=" >> $HGRCPATH @@ -38,8 +36,8 @@ rebase - $ hg rebase -s two -d one 2>&1 | cleanrebase - saved backup bundle to + $ hg rebase -s two -d one + saved backup bundle to .* $ hg log changeset: 3:9163974d1cb5
--- a/tests/test-bookmarks-strip.t Sun Aug 15 13:26:12 2010 -0500 +++ b/tests/test-bookmarks-strip.t Mon Aug 16 20:33:58 2010 +0200 @@ -1,4 +1,3 @@ - $ . $TESTDIR/helpers.sh $ echo "[extensions]" >> $HGRCPATH $ echo "bookmarks=" >> $HGRCPATH $ echo "mq=" >> $HGRCPATH @@ -50,8 +49,8 @@ strip to revision 1 - $ hg strip 1 | hidebackup - saved backup bundle to + $ hg strip 1 + saved backup bundle to .* list bookmarks
--- a/tests/test-mq-strip Sun Aug 15 13:26:12 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -#!/bin/sh - -. $TESTDIR/helpers.sh - -echo "[extensions]" >> $HGRCPATH -echo "mq=" >> $HGRCPATH -echo "graphlog=" >> $HGRCPATH - -restore() { - hg unbundle -q .hg/strip-backup/* - rm .hg/strip-backup/* -} -teststrip() { - hg up -C $1 - echo % before update $1, strip $2 - hg parents - hg --traceback strip $2 | hidebackup - echo % after update $1, strip $2 - hg parents - restore -} - -hg init test -cd test - -echo foo > bar -hg ci -Ama - -echo more >> bar -hg ci -Amb - -echo blah >> bar -hg ci -Amc - -hg up 1 -echo blah >> bar -hg ci -Amd - -echo final >> bar -hg ci -Ame - -hg log - -teststrip 4 4 -teststrip 4 3 -teststrip 1 4 -teststrip 4 2 -teststrip 4 1 -teststrip null 4 - -hg log - -hg up -C 2 -hg merge 4 -echo % before strip of merge parent -hg parents -hg strip 4 2>&1 | hidebackup -echo % after strip of merge parent -hg parents -restore - -hg up -hg glog -echo % 2 is parent of 3, only one strip should happen -hg strip 2 3 | hidebackup -hg glog -restore -hg glog -echo % 2 different branches: 2 strips -hg strip 2 4 | hidebackup -hg glog -restore -echo % 2 different branches and a common ancestor: 1 strip -hg strip 1 2 4 | hidebackup -restore - -# remove branchy history for qimport tests -hg strip 3 | hidebackup - -#strip of applied mq should cleanup status file -hg up -C 3 -echo fooagain >> bar -hg ci -mf -hg qimport -r tip:2 -echo % applied patches before strip -hg qapplied -echo % stripping revision in queue -hg strip 3 | hidebackup -echo % applied patches after stripping rev in queue -hg qapplied -echo % stripping ancestor of queue -hg strip 1 | hidebackup -echo % applied patches after stripping ancestor of queue -hg qapplied
--- a/tests/test-mq-strip.out Sun Aug 15 13:26:12 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,278 +0,0 @@ -adding bar -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -created new head -changeset: 4:443431ffac4f -tag: tip -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: e - -changeset: 3:65bd5f99a4a3 -parent: 1:ef3a871183d7 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: d - -changeset: 2:264128213d29 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: c - -changeset: 1:ef3a871183d7 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: b - -changeset: 0:9ab35a2d17cb -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: a - -0 files updated, 0 files merged, 0 files removed, 0 files unresolved -% before update 4, strip 4 -changeset: 4:443431ffac4f -tag: tip -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: e - -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -saved backup bundle to -% after update 4, strip 4 -changeset: 3:65bd5f99a4a3 -tag: tip -parent: 1:ef3a871183d7 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: d - -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -% before update 4, strip 3 -changeset: 4:443431ffac4f -tag: tip -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: e - -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -saved backup bundle to -% after update 4, strip 3 -changeset: 1:ef3a871183d7 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: b - -0 files updated, 0 files merged, 0 files removed, 0 files unresolved -% before update 1, strip 4 -changeset: 1:ef3a871183d7 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: b - -saved backup bundle to -% after update 1, strip 4 -changeset: 1:ef3a871183d7 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: b - -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -% before update 4, strip 2 -changeset: 4:443431ffac4f -tag: tip -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: e - -saved backup bundle to -% after update 4, strip 2 -changeset: 3:443431ffac4f -tag: tip -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: e - -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -% before update 4, strip 1 -changeset: 4:264128213d29 -tag: tip -parent: 1:ef3a871183d7 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: c - -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -saved backup bundle to -% after update 4, strip 1 -changeset: 0:9ab35a2d17cb -tag: tip -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: a - -0 files updated, 0 files merged, 1 files removed, 0 files unresolved -% before update null, strip 4 -saved backup bundle to -% after update null, strip 4 -changeset: 4:264128213d29 -tag: tip -parent: 1:ef3a871183d7 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: c - -changeset: 3:443431ffac4f -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: e - -changeset: 2:65bd5f99a4a3 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: d - -changeset: 1:ef3a871183d7 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: b - -changeset: 0:9ab35a2d17cb -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: a - -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -0 files updated, 0 files merged, 0 files removed, 0 files unresolved -(branch merge, don't forget to commit) -% before strip of merge parent -changeset: 2:65bd5f99a4a3 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: d - -changeset: 4:264128213d29 -tag: tip -parent: 1:ef3a871183d7 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: c - -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -saved backup bundle to -% after strip of merge parent -changeset: 1:ef3a871183d7 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: b - -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -@ changeset: 4:264128213d29 -| tag: tip -| parent: 1:ef3a871183d7 -| user: test -| date: Thu Jan 01 00:00:00 1970 +0000 -| summary: c -| -| o changeset: 3:443431ffac4f -| | user: test -| | date: Thu Jan 01 00:00:00 1970 +0000 -| | summary: e -| | -| o changeset: 2:65bd5f99a4a3 -|/ user: test -| date: Thu Jan 01 00:00:00 1970 +0000 -| summary: d -| -o changeset: 1:ef3a871183d7 -| user: test -| date: Thu Jan 01 00:00:00 1970 +0000 -| summary: b -| -o changeset: 0:9ab35a2d17cb - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: a - -% 2 is parent of 3, only one strip should happen -saved backup bundle to -@ changeset: 2:264128213d29 -| tag: tip -| user: test -| date: Thu Jan 01 00:00:00 1970 +0000 -| summary: c -| -o changeset: 1:ef3a871183d7 -| user: test -| date: Thu Jan 01 00:00:00 1970 +0000 -| summary: b -| -o changeset: 0:9ab35a2d17cb - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: a - -o changeset: 4:443431ffac4f -| tag: tip -| user: test -| date: Thu Jan 01 00:00:00 1970 +0000 -| summary: e -| -o changeset: 3:65bd5f99a4a3 -| parent: 1:ef3a871183d7 -| user: test -| date: Thu Jan 01 00:00:00 1970 +0000 -| summary: d -| -| @ changeset: 2:264128213d29 -|/ user: test -| date: Thu Jan 01 00:00:00 1970 +0000 -| summary: c -| -o changeset: 1:ef3a871183d7 -| user: test -| date: Thu Jan 01 00:00:00 1970 +0000 -| summary: b -| -o changeset: 0:9ab35a2d17cb - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: a - -% 2 different branches: 2 strips -0 files updated, 0 files merged, 0 files removed, 0 files unresolved -saved backup bundle to -saved backup bundle to -@ changeset: 2:65bd5f99a4a3 -| tag: tip -| user: test -| date: Thu Jan 01 00:00:00 1970 +0000 -| summary: d -| -o changeset: 1:ef3a871183d7 -| user: test -| date: Thu Jan 01 00:00:00 1970 +0000 -| summary: b -| -o changeset: 0:9ab35a2d17cb - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: a - -% 2 different branches and a common ancestor: 1 strip -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -saved backup bundle to -saved backup bundle to -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -% applied patches before strip -2.diff -3.diff -4.diff -% stripping revision in queue -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -saved backup bundle to -% applied patches after stripping rev in queue -2.diff -% stripping ancestor of queue -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -saved backup bundle to -% applied patches after stripping ancestor of queue
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-mq-strip.t Mon Aug 16 20:33:58 2010 +0200 @@ -0,0 +1,382 @@ + $ echo "[extensions]" >> $HGRCPATH + $ echo "mq=" >> $HGRCPATH + $ echo "graphlog=" >> $HGRCPATH + + $ restore() { + > hg unbundle -q .hg/strip-backup/* + > rm .hg/strip-backup/* + > } + $ teststrip() { + > hg up -C $1 + > echo % before update $1, strip $2 + > hg parents + > hg --traceback strip $2 + > echo % after update $1, strip $2 + > hg parents + > restore + > } + + $ hg init test + $ cd test + + $ echo foo > bar + $ hg ci -Ama + adding bar + + $ echo more >> bar + $ hg ci -Amb + + $ echo blah >> bar + $ hg ci -Amc + + $ hg up 1 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ echo blah >> bar + $ hg ci -Amd + created new head + + $ echo final >> bar + $ hg ci -Ame + + $ hg log + changeset: 4:443431ffac4f + tag: tip + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: e + + changeset: 3:65bd5f99a4a3 + parent: 1:ef3a871183d7 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: d + + changeset: 2:264128213d29 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: c + + changeset: 1:ef3a871183d7 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: b + + changeset: 0:9ab35a2d17cb + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: a + + + $ teststrip 4 4 + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + % before update 4, strip 4 + changeset: 4:443431ffac4f + tag: tip + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: e + + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + saved backup bundle to .* + % after update 4, strip 4 + changeset: 3:65bd5f99a4a3 + tag: tip + parent: 1:ef3a871183d7 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: d + + $ teststrip 4 3 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + % before update 4, strip 3 + changeset: 4:443431ffac4f + tag: tip + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: e + + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + saved backup bundle to .* + % after update 4, strip 3 + changeset: 1:ef3a871183d7 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: b + + $ teststrip 1 4 + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + % before update 1, strip 4 + changeset: 1:ef3a871183d7 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: b + + saved backup bundle to .* + % after update 1, strip 4 + changeset: 1:ef3a871183d7 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: b + + $ teststrip 4 2 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + % before update 4, strip 2 + changeset: 4:443431ffac4f + tag: tip + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: e + + saved backup bundle to .* + % after update 4, strip 2 + changeset: 3:443431ffac4f + tag: tip + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: e + + $ teststrip 4 1 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + % before update 4, strip 1 + changeset: 4:264128213d29 + tag: tip + parent: 1:ef3a871183d7 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: c + + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + saved backup bundle to .* + % after update 4, strip 1 + changeset: 0:9ab35a2d17cb + tag: tip + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: a + + $ teststrip null 4 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + % before update null, strip 4 + saved backup bundle to .* + % after update null, strip 4 + + $ hg log + changeset: 4:264128213d29 + tag: tip + parent: 1:ef3a871183d7 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: c + + changeset: 3:443431ffac4f + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: e + + changeset: 2:65bd5f99a4a3 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: d + + changeset: 1:ef3a871183d7 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: b + + changeset: 0:9ab35a2d17cb + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: a + + + $ hg up -C 2 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg merge 4 + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + (branch merge, don't forget to commit) + +before strip of merge parent + + $ hg parents + changeset: 2:65bd5f99a4a3 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: d + + changeset: 4:264128213d29 + tag: tip + parent: 1:ef3a871183d7 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: c + + $ hg strip 4 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + saved backup bundle to .* + +after strip of merge parent + + $ hg parents + changeset: 1:ef3a871183d7 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: b + + $ restore + + $ hg up + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg glog + @ changeset: 4:264128213d29 + | tag: tip + | parent: 1:ef3a871183d7 + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: c + | + | o changeset: 3:443431ffac4f + | | user: test + | | date: Thu Jan 01 00:00:00 1970 +0000 + | | summary: e + | | + | o changeset: 2:65bd5f99a4a3 + |/ user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: d + | + o changeset: 1:ef3a871183d7 + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: b + | + o changeset: 0:9ab35a2d17cb + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: a + + +2 is parent of 3, only one strip should happen + + $ hg strip 2 3 + saved backup bundle to .* + $ hg glog + @ changeset: 2:264128213d29 + | tag: tip + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: c + | + o changeset: 1:ef3a871183d7 + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: b + | + o changeset: 0:9ab35a2d17cb + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: a + + $ restore + $ hg glog + o changeset: 4:443431ffac4f + | tag: tip + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: e + | + o changeset: 3:65bd5f99a4a3 + | parent: 1:ef3a871183d7 + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: d + | + | @ changeset: 2:264128213d29 + |/ user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: c + | + o changeset: 1:ef3a871183d7 + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: b + | + o changeset: 0:9ab35a2d17cb + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: a + + +2 different branches: 2 strips + + $ hg strip 2 4 + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + saved backup bundle to .* + saved backup bundle to .* + $ hg glog + @ changeset: 2:65bd5f99a4a3 + | tag: tip + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: d + | + o changeset: 1:ef3a871183d7 + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: b + | + o changeset: 0:9ab35a2d17cb + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: a + + $ restore + +2 different branches and a common ancestor: 1 strip + + $ hg strip 1 2 4 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + saved backup bundle to .* + $ restore + + +remove branchy history for qimport tests + + $ hg strip 3 + saved backup bundle to .* + + +strip of applied mq should cleanup status file + + $ hg up -C 3 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ echo fooagain >> bar + $ hg ci -mf + $ hg qimport -r tip:2 + +applied patches before strip + + $ hg qapplied + 2.diff + 3.diff + 4.diff + +stripping revision in queue + + $ hg strip 3 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + saved backup bundle to .* + +applied patches after stripping rev in queue + + $ hg qapplied + 2.diff + +stripping ancestor of queue + + $ hg strip 1 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + saved backup bundle to .* + +applied patches after stripping ancestor of queue + + $ hg qapplied
--- a/tests/test-mq-symlinks Sun Aug 15 13:26:12 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -#!/bin/sh - -"$TESTDIR/hghave" symlink || exit 80 - -echo "[extensions]" >> $HGRCPATH -echo "mq=" >> $HGRCPATH - -hg init -hg qinit -hg qnew base.patch -echo aaa > a -echo bbb > b -echo ccc > c -hg add a b c -hg qrefresh -$TESTDIR/readlink.py a - -echo '% test replacing a file with a symlink' -hg qnew symlink.patch -rm a -ln -s b a -hg qrefresh --git -$TESTDIR/readlink.py a - -hg qpop -hg qpush -$TESTDIR/readlink.py a - -echo '% test updating a symlink' -rm a -ln -s c a -hg qnew --git -f updatelink -$TESTDIR/readlink.py a -hg qpop -hg qpush --debug -$TESTDIR/readlink.py a -hg st - -echo '% test replacing a symlink with a file' -ln -s c s -hg add s -hg qnew --git -f addlink -rm s -echo sss > s -hg qnew --git -f replacelinkwithfile -hg qpop -hg qpush -cat s -hg st - -echo '% test symlink removal' -hg qnew removesl.patch -hg rm a -hg qrefresh --git -hg qpop -hg qpush -hg st -c
--- a/tests/test-mq-symlinks.out Sun Aug 15 13:26:12 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -a -> a not a symlink -% test replacing a file with a symlink -a -> b -popping symlink.patch -now at: base.patch -applying symlink.patch -now at: symlink.patch -a -> b -% test updating a symlink -a -> c -popping updatelink -now at: symlink.patch -applying updatelink -patching file a -a -now at: updatelink -a -> c -% test replacing a symlink with a file -popping replacelinkwithfile -now at: addlink -applying replacelinkwithfile -now at: replacelinkwithfile -sss -% test symlink removal -popping removesl.patch -now at: replacelinkwithfile -applying removesl.patch -now at: removesl.patch -C b -C c -C s
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-mq-symlinks.t Mon Aug 16 20:33:58 2010 +0200 @@ -0,0 +1,90 @@ + $ "$TESTDIR/hghave" symlink || exit 80 + + $ echo "[extensions]" >> $HGRCPATH + $ echo "mq=" >> $HGRCPATH + + $ hg init + $ hg qinit + $ hg qnew base.patch + $ echo aaa > a + $ echo bbb > b + $ echo ccc > c + $ hg add a b c + $ hg qrefresh + $ $TESTDIR/readlink.py a + a -> a not a symlink + + +test replacing a file with a symlink + + $ hg qnew symlink.patch + $ rm a + $ ln -s b a + $ hg qrefresh --git + $ $TESTDIR/readlink.py a + a -> b + + $ hg qpop + popping symlink.patch + now at: base.patch + $ hg qpush + applying symlink.patch + now at: symlink.patch + $ $TESTDIR/readlink.py a + a -> b + + +test updating a symlink + + $ rm a + $ ln -s c a + $ hg qnew --git -f updatelink + $ $TESTDIR/readlink.py a + a -> c + $ hg qpop + popping updatelink + now at: symlink.patch + $ hg qpush --debug + applying updatelink + patching file a + a + now at: updatelink + $ $TESTDIR/readlink.py a + a -> c + $ hg st + + +test replacing a symlink with a file + + $ ln -s c s + $ hg add s + $ hg qnew --git -f addlink + $ rm s + $ echo sss > s + $ hg qnew --git -f replacelinkwithfile + $ hg qpop + popping replacelinkwithfile + now at: addlink + $ hg qpush + applying replacelinkwithfile + now at: replacelinkwithfile + $ cat s + sss + $ hg st + + +test symlink removal + + $ hg qnew removesl.patch + $ hg rm a + $ hg qrefresh --git + $ hg qpop + popping removesl.patch + now at: replacelinkwithfile + $ hg qpush + applying removesl.patch + now at: removesl.patch + $ hg st -c + C b + C c + C s
--- a/tests/test-mq.t Sun Aug 15 13:26:12 2010 -0500 +++ b/tests/test-mq.t Mon Aug 16 20:33:58 2010 +0200 @@ -1,5 +1,3 @@ - $ . $TESTDIR/helpers.sh - $ checkundo() > { > if [ -f .hg/store/undo ]; then @@ -733,9 +731,9 @@ $ echo x>x $ hg ci -Ama adding x - $ hg strip tip | hidebackup + $ hg strip tip 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - saved backup bundle to + saved backup bundle to .* $ hg unbundle .hg/strip-backup/* adding changesets adding manifests @@ -750,14 +748,14 @@ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo y>y $ hg add y - $ hg strip tip | hidebackup + $ hg strip tip abort: local changes found --force strip with local changes - $ hg strip -f tip | hidebackup + $ hg strip -f tip 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - saved backup bundle to + saved backup bundle to .* cd b; hg qrefresh @@ -1110,9 +1108,9 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: add foo - $ hg strip 1 | hidebackup + $ hg strip 1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - saved backup bundle to + saved backup bundle to .* $ checkundo strip $ hg log changeset: 1:20cbbe65cff7