monotone

monotone Mtn Source Tree

Root/src/roster_delta.hh

1// Copyright (C) 2006 Nathaniel Smith <njs@pobox.com>
2//
3// This program is made available under the GNU GPL version 2.0 or
4// greater. See the accompanying file COPYING for details.
5//
6// This program is distributed WITHOUT ANY WARRANTY; without even the
7// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8// PURPOSE.
9
10#ifndef __ROSTER_DELTA_HH__
11#define __ROSTER_DELTA_HH__
12
13// This file contains "diff"/"patch" code that operates directly on rosters
14// (with their associated markings).
15
16#include "rev_types.hh"
17
18// You should pass a null for 'reverse_cs' if this is a merge edge, because in
19// that case even untouched nodes can have different mark sets.
20// Note that 'reverse_cs' is the cset that starts with 'to' and gives 'from',
21// because that's what's available in the only place this is used.
22void
23delta_rosters(roster_t const & from, marking_map const & from_markings,
24 roster_t const & to, marking_map const & to_markings,
25 roster_delta & del,
26 cset const * reverse_cs);
27
28// mutates its arguments
29void
30apply_roster_delta(roster_delta const & del,
31 roster_t & roster, marking_map & markings);
32
33bool
34try_get_markings_from_roster_delta(roster_delta const & del,
35 node_id const & nid,
36 const_marking_t & markings);
37
38// See the comment on this function's body for a description of its api.
39bool
40try_get_content_from_roster_delta(roster_delta const & del,
41 node_id const & nid,
42 file_id & content);
43
44#endif // __ROSTER_DELTA_HH__
45
46
47// Local Variables:
48// mode: C++
49// fill-column: 76
50// c-file-style: "gnu"
51// indent-tabs-mode: nil
52// End:
53// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:

Archive Download this file

Branches

Tags

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