D6417: context: get filesadded() and filesremoved() from changeset if configured
Yuya Nishihara
yuya at tcha.org
Sun May 26 19:29:35 EDT 2019
I can't really comment on the storage format. I'm not keen on using extras
for this kind of stuff (including copies), but that seems be okay for
experiment.
@indygreg Any comments?
> +def decodefileindices(files, data):
> + try:
> + subset = []
> + for str in data.split('\0'):
> + i = int(str)
Better to not shadow `str()` function.
> + if i < 0 or i > len(files):
Off by one?
> + return None
> + subset.append(files[i])
> + return subset
> + except (ValueError, IndexError):
> + # Perhaps someone had chosen the same key name (e.g. "added") and
> + # used different syntax for the value.
More information about the Mercurial-devel
mailing list