Re: D3716: ui: add an uninterruptable context manager that can block SIGINT

2018-07-28 Thread Yuya Nishihara
> > I’m ok with disabling the test as long as it doesn’t explode on Windows > > without turning the experimental knobs. It sounded like future would would > > depend on this, and I wasn’t sure if that landed yet. > > We’ve already made some use of it in core - anything that calls strip will

Re: D3716: ui: add an uninterruptable context manager that can block SIGINT

2018-07-28 Thread Augie Fackler
>>> Do we need a different strategy for Windows, or just eat the error? (See >>> the unsupported signal message) >>> >>> >>> https://buildbot.mercurial-scm.org/builders/Win7%20x86_64%20hg%20tests/builds/808/steps/run-tests.py%20%28python%202.7.13%29/logs/stdio >> >> I'm not sure. We could

Re: D3716: ui: add an uninterruptable context manager that can block SIGINT

2018-06-28 Thread Yuya Nishihara
> +@contextlib.contextmanager > +def uninterruptable(self): > +"""Mark an operation as unsafe. > + > +Most operations on a repository are safe to interrupt, but a > +few are risky (for example repair.strip). This context manager > +lets you advise Mercurial