revlog: recommit
49fd21f32695 with a fix for
issue6528
`filelog.size` currently special cases two forms of metadata encoding:
- copy data via the parent order as flag bit
- censor data by peaking into the raw delta
All other forms of metadata encoding including the empty metadata block
are mishandled. In `basefilectx.cmp` the empty metadata block is
explicitly checked to compensate for this.
Restore
49fd21f32695, but disable it for filelog, so that the original
flag bit use contines to work. Document all this mess for now in
preparation of a proper rework.
Differential Revision: https://phab.mercurial-scm.org/D11203
merge-lists: make it possible to specify pattern to match
The `merge-lists` tool doesn't know anything about Python other than
its regex that attempts to match import lines. Let's make it possible
to pass in a custom regex so it's easy to use the tool for e.g. C/C++
`#include` lines or Rust `use` lines (given the limited).
Differential Revision: https://phab.mercurial-scm.org/D12392
contrib: add a partial-merge tool for sorted lists (such as Python imports)
This is a pretty naive tool that uses a regular expression for
matching lines. It is based on a Google-internal tool that worked in a
similar way.
For now, the regular expression is hard-coded to attempt to match
single-line Python imports. The only commit I've found in the hg core
repo where the tool helped was commit
9cd6292abfdf. I think that's
because we often use multiple imports per import statement. I think
this tool is still a decent first step (especially once the regex is
made configurable in the next patch). The merging should ideally use a
proper Python parser and do the merge at the AST (or CST?) level, but
that's significantly harder, especially if you want to preserve
comments and whitespace. It's also less generic.
Differential Revision: https://phab.mercurial-scm.org/D12380
Added signature for changeset
5bd6bcd31dd1
Added tag 6.1.1 for changeset
5bd6bcd31dd1