view mercurial/bdiff.h @ 34453:40b6d25ed2d5

test-strip: make test compatible with chg The test was using reposetup which had the logic for stripping commits. This leads to a situation where if the reposetup was called twice for an extension (which can happen with chg running), the stripped node would not be found the second time. Therefore, this commit changes the test to put the stripping logic inside commands instead of the reposetup. This ensures that the stripping logic is invoked only when the command is invoked and thus, avoids any problems. Test Plan: Ran the test 'test-strip.t' with and without the '--chg' option. Differential Revision: https://phab.mercurial-scm.org/D928
author Saurabh Singh <singhsrb@fb.com>
date Tue, 03 Oct 2017 16:59:17 -0700
parents 9631ff5ebbeb
children 72985b390d7c
line wrap: on
line source

#ifndef _HG_BDIFF_H_
#define _HG_BDIFF_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