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 "vocab.hh"
16#include "roster.hh"
17
18void
19delta_rosters(roster_t const & from, marking_map const & from_markings,
20 roster_t const & to, marking_map const & to_markings,
21 roster_delta & del);
22
23// mutates its arguments
24void
25apply_roster_delta(roster_delta const & del,
26 roster_t & roster, marking_map & markings);
27
28bool
29try_get_markings_from_roster_delta(roster_delta const & del,
30 node_id const & nid,
31 marking_t & markings);
32
33// See the comment on this function's body for a description of its api.
34bool
35try_get_content_from_roster_delta(roster_delta const & del,
36 node_id const & nid,
37 file_id & content);
38
39#ifdef BUILD_UNIT_TESTS
40
41// instead of having elaborate tests here, we just export a function, and then
42// let all the other code that already generates every strange and weird test
43// case there is feed us our tests
44void test_roster_delta_on(roster_t const & a, marking_map const & a_marking,
45 roster_t const & b, marking_map const & b_marking);
46
47#endif // BUILD_UNIT_TESTS
48
49#endif // __ROSTER_DELTA_HH__
50
51
52// Local Variables:
53// mode: C++
54// fill-column: 76
55// c-file-style: "gnu"
56// indent-tabs-mode: nil
57// End:
58// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
59

Archive Download this file

Branches

Tags

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