monotone

monotone Mtn Source Tree

Root/roster_delta.hh

1#ifndef __ROSTER_DELTA_HH__
2
3// Copyright (C) 2006 Nathaniel Smith <njs@pobox.com>
4//
5// This program is made available under the GNU GPL version 2.0 or
6// greater. See the accompanying file COPYING for details.
7//
8// This program is distributed WITHOUT ANY WARRANTY; without even the
9// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10// PURPOSE.
11
12// This file contains "diff"/"patch" code that operates directly on rosters
13// (with their associated markings).
14
15#include "rev_types.hh"
16
17void
18delta_rosters(roster_t const & from, marking_map const & from_markings,
19 roster_t const & to, marking_map const & to_markings,
20 roster_delta & del);
21
22// mutates its arguments
23void
24apply_roster_delta(roster_delta const & del,
25 roster_t & roster, marking_map & markings);
26
27bool
28try_get_markings_from_roster_delta(roster_delta const & del,
29 node_id const & nid,
30 marking_t & markings);
31
32// See the comment on this function's body for a description of its api.
33bool
34try_get_content_from_roster_delta(roster_delta const & del,
35 node_id const & nid,
36 file_id & content);
37
38#ifdef BUILD_UNIT_TESTS
39
40// instead of having elaborate tests here, we just export a function, and then
41// let all the other code that already generates every strange and weird test
42// case there is feed us our tests
43void test_roster_delta_on(roster_t const & a, marking_map const & a_marking,
44 roster_t const & b, marking_map const & b_marking);
45
46#endif // BUILD_UNIT_TESTS
47
48#endif // __ROSTER_DELTA_HH__
49
50
51// Local Variables:
52// mode: C++
53// fill-column: 76
54// c-file-style: "gnu"
55// indent-tabs-mode: nil
56// End:
57// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
58

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status