Mercurial > hg
view mercurial/bdiff.h @ 44826:35b255e474d9 stable
dirstate: make sure the dirstate is loaded before the changelog (issue6303)
Before this change, it was possible for the changelog to be loaded before the
dirstate. If a transaction happens betwen the changelog and dirstate reading,
the dirstate can up end poitning toward a revision not existing in the (olded)
changelog. This lead to a warning.
With this revision, we preload the dirstate parent before reading the changelog.
This has a negligible performance impact on performance for all case we are
tracking.
Differential Revision: https://phab.mercurial-scm.org/D8528
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 11 May 2020 13:08:02 +0200 |
parents | 174d115d8104 |
children | d86908050375 |
line wrap: on
line source
#ifndef _HG_BDIFF_H_ #define _HG_BDIFF_H_ #include "compat.h" struct bdiff_line { int hash, n, e; ssize_t len; const char *l; }; struct bdiff_hunk; struct bdiff_hunk { int a1, a2, b1, b2; struct bdiff_hunk *next; }; int bdiff_splitlines(const char *a, ssize_t len, struct bdiff_line **lr); int bdiff_diff(struct bdiff_line *a, int an, struct bdiff_line *b, int bn, struct bdiff_hunk *base); void bdiff_freehunks(struct bdiff_hunk *l); #endif