shelve: remove deprecated visibility code from test

Summary:
The shelve test used to have code to check visibility (with obsmarkers) worked
ok in a transaction.  We've removed obsmarkers, so this doesn't apply anymore.

Delete the test code - we've been running without it ok for a couple of years, and `shelve` is likely to get replaced by snapshots at some point anyway.

Reviewed By: DurhamG

Differential Revision: D33234288

fbshipit-source-id: 809e469016cd0c84927735f2f459e57743e90ec3
This commit is contained in:
Mark Juggurnauth-Thomas 2021-12-20 09:21:20 -08:00 committed by Facebook GitHub Bot
parent 812b8a894f
commit 66c92a99c3

View File

@ -882,150 +882,6 @@ sh % "hg shelve --stat nonexistentshelf" == r"""
abort: cannot find shelf nonexistentshelf
[255]"""
# Test visibility of in-memory changes inside transaction to external hook
# ------------------------------------------------------------------------
sh % "echo xxxx" >> "x"
sh % "hg commit -m 'shelve changes to invoke rebase'"
# Unsupport by t.py: no external shell scripts
if feature.check("false"):
sh % "hg bookmark unshelvedest"
sh % "cat" << r"""
echo "==== \$1:"
hg parents --template "VISIBLE {node|short}\n"
# test that pending changes are hidden
unset HG_PENDING
unset HG_SHAREDPENDING
hg parents --template "ACTUAL {node|short}\n"
echo "===="
""" > "$TESTTMP/checkvisibility.sh"
(
sh % "cat"
<< r"""
[defaults]
# to fix hash id of temporary revisions
unshelve = --date '0 0'
"""
>> ".hg/hgrc"
)
# "hg unshelve"implies steps below:
# (1) commit changes in the working directory
# (2) note shelved revision
# (3) rebase: merge shelved revision into temporary wc changes
# (4) rebase: commit merged revision
# (5) rebase: update to a new commit
# (6) update to original working copy parent
# == test visibility to external preupdate hook
(
sh % "cat"
<< r"""
[hooks]
preupdate.visibility = sh $TESTTMP/checkvisibility.sh preupdate
"""
>> ".hg/hgrc"
)
sh % "echo nnnn" >> "n"
sh % 'sh "$TESTTMP/checkvisibility.sh" before-unshelving' == r"""
==== before-unshelving:
VISIBLE 47f190a8b2e0
ACTUAL 47f190a8b2e0
===="""
sh % "hg unshelve --keep default" == r"""
temporarily committing pending changes (restore with 'hg unshelve --abort')
rebasing shelved changes
rebasing 27:80096f006bb2 "shelve changes to: create conflict"
==== preupdate:
VISIBLE (?!f77bf047d4c5).* (re)
ACTUAL 47f190a8b2e0
====
==== preupdate:
VISIBLE (?!f77bf047d4c5).* (re)
ACTUAL 47f190a8b2e0
====
==== preupdate:
VISIBLE (?!f77bf047d4c5).* (re)
ACTUAL 47f190a8b2e0
===="""
(
sh % "cat"
<< r"""
[hooks]
preupdate.visibility =
"""
>> ".hg/hgrc"
)
sh % 'sh "$TESTTMP/checkvisibility.sh" after-unshelving' == r"""
==== after-unshelving:
VISIBLE 47f190a8b2e0
ACTUAL 47f190a8b2e0
===="""
# == test visibility to external update hook
sh % "hg update -q -C unshelvedest"
(
sh % "cat"
<< r"""
[hooks]
update.visibility = sh $TESTTMP/checkvisibility.sh update
"""
>> ".hg/hgrc"
)
sh % "echo nnnn" >> "n"
sh % 'sh "$TESTTMP/checkvisibility.sh" before-unshelving' == r"""
==== before-unshelving:
VISIBLE 47f190a8b2e0
ACTUAL 47f190a8b2e0
===="""
sh % "hg unshelve --keep default" == r"""
temporarily committing pending changes (restore with 'hg unshelve --abort')
rebasing shelved changes
rebasing 27:80096f006bb2 "shelve changes to: create conflict"
==== update:
VISIBLE f08f4865d656
VISIBLE 80096f006bb2
ACTUAL 47f190a8b2e0
====
==== update:
VISIBLE f08f4865d656
ACTUAL 47f190a8b2e0
====
==== update:
VISIBLE 47f190a8b2e0
ACTUAL 47f190a8b2e0
===="""
(
sh % "cat"
<< r"""
[hooks]
update.visibility =
"""
>> ".hg/hgrc"
)
sh % 'sh "$TESTTMP/checkvisibility.sh" after-unshelving' == r"""
==== after-unshelving:
VISIBLE 47f190a8b2e0
ACTUAL 47f190a8b2e0
===="""
sh % "hg bookmark -d unshelvedest"
sh % "cd .."
# Test .orig files go where the user wants them to
# ---------------------------------------------------------------
sh % "newrepo obssh-salvage"