Mercurial > hg
view mercurial/bdiff.h @ 35778:128dd940bedc
repair: invalidate volatile sets after stripping
Matt Harbison reported that some tests were broken on Windows after
1a09dad8b85a (evolution: report new unstable changesets,
2018-01-14). The failures were exactly as seen in this patch. The
failures actually seemed correct, which made me wonder why they didn't
fail the same way on Linux. It turned out to be a cache invalidation
problem.
The new orphan mentioned in the test case actually does get created
when we're re-applying the temporary bundle that's created while
stripping. However, without the invalidation, it appears that there
was already an orphan before applying the temporary bundle.
The warnings about unknown working parent appear because the
aformentioned changeset means that we're now accessing the dirstate
while it's invalid.
We may want to suppress these messages that happen in the intermediate
strip state, but they're technically correct (although confusing to
the user), so I think just fixing the cache invalidation is fine for
now.
I haven't figured out why the caches seemed to get correctly
invalidated on Windows.
Differential Revision: https://phab.mercurial-scm.org/D1933
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 20 Jan 2018 23:21:59 -0800 |
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