ui: check for progress singleton when clearing progress bar (
issue5684)
A combination of wrapping `ui` and progress bars interrupted by exceptions can
lead to the progress bar not being cleared when the exception error is printed.
This results in corrupted-looking output like this:
```
updating [===============================> ] 1/2u
nresolved conflicts (see hg resolve, then hg rebase --continue)
```
This is because in `ui._progclear`, we only check the local reference to the
progress bar, not whether or not there is an instance of the singleton. When a
progress bar is interrupted by an exception, the exception printing in
`scmutil.callcatch` uses the original instance of the `ui` object, not the
wrapped copy that has `_progbar` set.
When consider whether or not to clear the progress bar, check for the existence
of the singleton, rather than just whether or not we have a local reference to
it.
Differential Revision: https://phab.mercurial-scm.org/D743
py3: whitelist 15 more tests passing on Python 3
We have reached the count of 75 tests passing on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D858
py3: use pycompat.bytestr instead of str
Differential Revision: https://phab.mercurial-scm.org/D855
py3: explicitly convert dict.keys() and dict.items() into a list
Differential Revision: https://phab.mercurial-scm.org/D853
py3: use '%d' instead of '%s' for integers
Differential Revision: https://phab.mercurial-scm.org/D856
py3: use pycompat.strkwargs() before passing a dict as keyword argument
Differential Revision: https://phab.mercurial-scm.org/D854
py3: return False early while checking whether None is a key in lazymanifest
In this patch we returns False early if we are trying to check whether None is a
key in lazymanifest. The reason I added a diff is that on Python 3, it goes into
the lazy manifest code an returns a TypeError. I checked with Durham that
whether None can be a possible key in lazymanifest and he said "no". So it's
safe to have this if statement.
This fixes `hg merge` on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D852
dirstate: use keyword arguments to clarify status()'s callers
The arguments are especially non-obvious because the order is
different from dirstate.walk().
Differential Revision: https://phab.mercurial-scm.org/D847
dirstate: use keyword arguments to clarify walk()'s callers
The arguments are especially non-obvious because the order is
different from dirstate.status().
Differential Revision: https://phab.mercurial-scm.org/D846
perf: remove fallbacks to ancient versions of dirstate.walk()
If the call to dirstate.walk() failed, we would try to fall back to
older versions. These were removed in
d3d1d39da2fa (walk: remove
cmdutil.walk, 2008-05-12) and
f8299c84b5b6 (dirstate: fold statwalk
and walk, 2008-06-26). We don't care about testing performance of
versions that old versions at this point, so let's clean up.
Differential Revision: https://phab.mercurial-scm.org/D845