hg unshelve error handling - an example

John Hein 2xfaanyctv at snkmail.com
Fri May 14 19:11:30 UTC 2021


Faheem Mitha wrote at 19:15 +0530 on May 12, 2021:
    .
    .
 > The Expect script `shelveinterrupt.exp` calls the shell script
 > `shelveinterrupt.sh`.
    .
    .
 > Suppose one does a Ctrl-C on the following dialog.
 > 
 >      file 'foo' was deleted in local [working-copy] but was modified in
 >      other [shelve].  You can use (c)hanged version, leave (d)eleted,
 >      or leave (u)nresolved.  What do you want to do? interrupted!
 > 
 > This results in a state of conflict.


When I run your test 'resolve' gets stuck waiting for a lock...

CALLING HG RESOLVE -M FOO
waiting for lock on working directory of /tmp/test-shelveinterrupt held by process '52693' on host 'babalu'

Maybe you have a lock implementation problem on your system?  Is this
a local filesystem?  network fileystem?  The lock is probably there
for a good reason, and it is not necessarily surprising that
performing an operation that ignores the lock may result in
ill-defined results.

Re "knowing the parent" of your shelve operation.  Look in
.hg/shelved/*.patch for that.

p.s. 'hg topics' fails in your script for me.  This probably doesn't
matter, but it's an indication you have an extension enabled other
than just the shelve extension.



More information about the Mercurial mailing list