shelve: fix dirstate corruption during unshelve (
issue4055)
If you shelved on top of commit A, then rebased A to @ and unshelved, any file
changed in A would appear as modified in hg status despite the contents not having
changed.
The fix is to use dirstate.setparents() instead of doing it manually. This will
be a little slower since it has to iterate through everything in the dirstate
instead of only what's in the mergestate, but this will be more correct since
the mergestate did not include files which were merged but had no conflict.
The tests also had several bad dirstate's hardcoded in them. This change updates
the tests appropriately and adds a new test to cover this specific rebase case.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!-- This is the second screen displayed during the install. -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
</style>
</head>
<body>
<p class="p1">This is a prepackaged release of <a href="http://mercurial.selenic.com/">Mercurial</a> for Mac OS X.</p>
<p class="p2"><br></p>
<br>
<p>
Please be sure to read the latest <a href="http://mercurial.selenic.com/wiki/WhatsNew">release notes</a>.</p>
</body>
</html>