localrepo: use node.hex instead of awkward .encode('latin1')
Spotted as an option by Yuya. Thanks!
templater: make pad() strip color codes before computing width (
issue5416)
Tested in ANSI mode. We might have to extend _ansieffectre to support
terminfo mode.
templater: make pad() compute actual width
str.ljust() and .rjust() are based on byte length, which are valid only for
ASCII characters.
templater: reject bad fillchar argument passed to pad()
Otherwise TypeError would be raised.
color: insert color code after every "\e[0m" (
issue5413)
This assumes the last color wins, tested in ANSI mode. I guess terminfo mode
would work in the same way.
debugtemplate: pass ui to templater so label() works
Follows up
3356bf61fa25.
subrepo: move prompts out of the if (
issue5505)
Prompts weren't available in the else clause
merge: remove unnecessary matcher checks
As part of changing manifest.diff to accept a matcher, a previous patch added
matcher calls to each location in merge.manifestmerge that tested if 'x in mf'
to maintain the same behavior as before. After analyzing it further, this
matcher call isn't needed, and in fact hurts future patches ability to use the
matcher here.
Basically, all these 'if x in mf' checks were checking if a matched file's copy
source was in the matcher as well. This meant if you passed a matcher for just
file foo, it would not return file bar even if foo was a copy of bar. Since
manifestmerge cares about copy information, let's allow all lookups of copy
sources.
We also update one spot with a 'is not None' check, since it wasn't obvious that
the value could sometimes be None before, which broke when we called
matcher(None).
A future patch adds matcher optimizations to manifestmerge which causes this
code path to get covered by existing tests.