diff --git a/mercurial/repair.py b/mercurial/repair.py --- a/mercurial/repair.py +++ b/mercurial/repair.py @@ -108,7 +108,7 @@ def strip(ui, repo, node, backup="all"): backupfile = None if backup == "all": backupfile = _bundle(repo, [node], cl.heads(), node, 'backup') - repo.ui.status(_("saving bundle to %s\n") % backupfile) + repo.ui.status(_("saved backup bundle to %s\n") % backupfile) if saveheads or extranodes: chgrpfile = _bundle(repo, savebases, saveheads, node, 'temp', extranodes) diff --git a/tests/helpers.sh b/tests/helpers.sh --- a/tests/helpers.sh +++ b/tests/helpers.sh @@ -8,10 +8,10 @@ hidehex() { python -c 'import sys, re; p hidetmp() { sed "s/$HGTMP/\$HGTMP/"; } -hidebackup() { sed 's/\(saving bundle to \).*/\1/'; } +hidebackup() { sed 's/\(saved backup bundle to \).*/\1/'; } cleanrebase() { sed -e 's/\(Rebase status stored to\).*/\1/' \ -e 's/\(Rebase status restored from\).*/\1/' \ - -e 's/\(saving bundle to \).*/\1/'; + -e 's/\(saved backup bundle to \).*/\1/'; } diff --git a/tests/test-bookmarks-strip b/tests/test-bookmarks-strip --- a/tests/test-bookmarks-strip +++ b/tests/test-bookmarks-strip @@ -1,5 +1,6 @@ #!/bin/sh +source $TESTDIR/helpers.sh echo "[extensions]" >> $HGRCPATH echo "bookmarks=" >> $HGRCPATH echo "mq=" >> $HGRCPATH @@ -37,7 +38,7 @@ echo % bookmarks updated? hg book echo % strip to revision 1 -hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/' +hg strip 1 | hidebackup echo % list bookmarks hg book diff --git a/tests/test-bookmarks-strip.out b/tests/test-bookmarks-strip.out --- a/tests/test-bookmarks-strip.out +++ b/tests/test-bookmarks-strip.out @@ -12,7 +12,7 @@ created new head test 1:16b24da7e457 test2 1:16b24da7e457 % strip to revision 1 -saving bundle to +saved backup bundle to adding branch adding changesets adding manifests diff --git a/tests/test-mq b/tests/test-mq --- a/tests/test-mq +++ b/tests/test-mq @@ -1,5 +1,7 @@ #!/bin/sh +source $TESTDIR/helpers.sh + checkundo() { if [ -f .hg/store/undo ]; then @@ -318,16 +320,16 @@ echo % strip cd ../../b echo x>x hg ci -Ama -hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' +hg strip tip | hidebackup hg unbundle .hg/strip-backup/* echo % strip with local changes, should complain hg up echo y>y hg add y -hg strip tip | sed 's/\(saving bundle to \).*/\1/' +hg strip tip | hidebackup echo % --force strip with local changes -hg strip -f tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' +hg strip -f tip | hidebackup echo '% cd b; hg qrefresh' hg init refresh @@ -502,7 +504,7 @@ hg ci -m 'change foo 2' HGMERGE=true hg merge hg ci -m merge hg log -hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/' +hg strip 1 | hidebackup checkundo strip hg log cd .. diff --git a/tests/test-mq-strip b/tests/test-mq-strip --- a/tests/test-mq-strip +++ b/tests/test-mq-strip @@ -1,5 +1,7 @@ #!/bin/sh +source $TESTDIR/helpers.sh + echo "[extensions]" >> $HGRCPATH echo "mq=" >> $HGRCPATH @@ -7,7 +9,7 @@ teststrip() { hg up -C $1 echo % before update $1, strip $2 hg parents - hg strip $2 2>&1 | sed 's/\(saving bundle to \).*/\1/' + hg strip $2 | hidebackup echo % after update $1, strip $2 hg parents hg unbundle -q .hg/strip-backup/* @@ -48,6 +50,6 @@ hg up -C 2 hg merge 4 echo % before strip of merge parent hg parents -hg strip 4 2>&1 | sed 's/\(saving bundle to \).*/\1/' +hg strip 4 2>&1 | hidebackup echo % after strip of merge parent hg parents diff --git a/tests/test-mq-strip.out b/tests/test-mq-strip.out --- a/tests/test-mq-strip.out +++ b/tests/test-mq-strip.out @@ -37,7 +37,7 @@ date: Thu Jan 01 00:00:00 1970 +0 summary: e 1 files updated, 0 files merged, 0 files removed, 0 files unresolved -saving bundle to +saved backup bundle to % after update 4, strip 4 changeset: 3:65bd5f99a4a3 tag: tip @@ -55,7 +55,7 @@ date: Thu Jan 01 00:00:00 1970 +0 summary: e 1 files updated, 0 files merged, 0 files removed, 0 files unresolved -saving bundle to +saved backup bundle to % after update 4, strip 3 changeset: 1:ef3a871183d7 user: test @@ -69,7 +69,7 @@ user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: b -saving bundle to +saved backup bundle to % after update 1, strip 4 changeset: 1:ef3a871183d7 user: test @@ -84,7 +84,7 @@ user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: e -saving bundle to +saved backup bundle to adding branch adding changesets adding manifests @@ -107,7 +107,7 @@ date: Thu Jan 01 00:00:00 1970 +0 summary: c 1 files updated, 0 files merged, 0 files removed, 0 files unresolved -saving bundle to +saved backup bundle to % after update 4, strip 1 changeset: 0:9ab35a2d17cb tag: tip @@ -117,7 +117,7 @@ summary: a 0 files updated, 0 files merged, 1 files removed, 0 files unresolved % before update null, strip 4 -saving bundle to +saved backup bundle to % after update null, strip 4 changeset: 4:264128213d29 tag: tip @@ -163,7 +163,7 @@ date: Thu Jan 01 00:00:00 1970 +0 summary: c 1 files updated, 0 files merged, 0 files removed, 0 files unresolved -saving bundle to +saved backup bundle to % after strip of merge parent changeset: 1:ef3a871183d7 user: test diff --git a/tests/test-mq.out b/tests/test-mq.out --- a/tests/test-mq.out +++ b/tests/test-mq.out @@ -334,7 +334,7 @@ qpush: test2.patch is already at the top % strip adding x 0 files updated, 0 files merged, 1 files removed, 0 files unresolved -saving bundle to +saved backup bundle to adding changesets adding manifests adding file changes @@ -345,7 +345,7 @@ 1 files updated, 0 files merged, 0 files abort: local changes found % --force strip with local changes 0 files updated, 0 files merged, 1 files removed, 0 files unresolved -saving bundle to +saved backup bundle to % cd b; hg qrefresh adding a foo @@ -529,7 +529,7 @@ date: Thu Jan 01 00:00:00 1970 +0 summary: add foo 1 files updated, 0 files merged, 0 files removed, 0 files unresolved -saving bundle to +saved backup bundle to adding branch adding changesets adding manifests diff --git a/tests/test-repair-strip.out b/tests/test-repair-strip.out --- a/tests/test-repair-strip.out +++ b/tests/test-repair-strip.out @@ -4,7 +4,7 @@ user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: a -saving bundle +saved backup bundle transaction abort! failed to truncate data/b.i rollback failed - please run hg recover @@ -55,7 +55,7 @@ user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: a -saving bundle +saved backup bundle transaction abort! failed to truncate 00manifest.i rollback failed - please run hg recover diff --git a/tests/test-strip-cross b/tests/test-strip-cross --- a/tests/test-strip-cross +++ b/tests/test-strip-cross @@ -2,17 +2,13 @@ # test stripping of filelogs where the linkrev doesn't always increase +source $TESTDIR/helpers.sh echo '[extensions]' >> $HGRCPATH echo 'hgext.mq =' >> $HGRCPATH hg init orig cd orig -hidefilename() -{ - sed -e 's/saving bundle to .*strip-backup/saving bundle to strip-backup/' -} - commit() { hg up -qC null @@ -60,7 +56,7 @@ done for i in 0 1 2 3 4; do hg clone -q -U --pull crossed $i echo "% Trying to strip revision $i" - hg --cwd $i strip $i 2>&1 | hidefilename + hg --cwd $i strip $i | hidebackup echo "% Verifying" hg --cwd $i verify echo diff --git a/tests/test-strip-cross.out b/tests/test-strip-cross.out --- a/tests/test-strip-cross.out +++ b/tests/test-strip-cross.out @@ -48,7 +48,7 @@ crossed/.hg/store/data/manifest-file.i 1 3 3 1 4 5d9299349fc0 000000000000 000000000000 % Trying to strip revision 0 -saving bundle to strip-backup/cbb8c2f0a2e3-backup +saved backup bundle to adding branch adding changesets adding manifests @@ -62,7 +62,7 @@ checking files 7 files, 4 changesets, 15 total revisions % Trying to strip revision 1 -saving bundle to strip-backup/124ecc0cbec9-backup +saved backup bundle to adding branch adding changesets adding manifests @@ -76,7 +76,7 @@ checking files 7 files, 4 changesets, 14 total revisions % Trying to strip revision 2 -saving bundle to strip-backup/f6439b304a1a-backup +saved backup bundle to adding branch adding changesets adding manifests @@ -90,7 +90,7 @@ checking files 7 files, 4 changesets, 14 total revisions % Trying to strip revision 3 -saving bundle to strip-backup/6e54ec5db740-backup +saved backup bundle to adding branch adding changesets adding manifests @@ -104,7 +104,7 @@ checking files 7 files, 4 changesets, 19 total revisions % Trying to strip revision 4 -saving bundle to strip-backup/9147ea23c156-backup +saved backup bundle to % Verifying checking changesets checking manifests