monotone

monotone Mtn Source Tree

Root/merge.hh

1#ifndef __MERGE_HH__
2#define __MERGE_HH__
3
4// Copyright (C) 2005 Nathaniel Smith <njs@pobox.com>
5//
6// This program is made available under the GNU GPL version 2.0 or
7// greater. See the accompanying file COPYING for details.
8//
9// This program is distributed WITHOUT ANY WARRANTY; without even the
10// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11// PURPOSE.
12
13#include "vocab.hh"
14
15class database;
16class lua_hooks;
17class roster_t;
18
19// Destructively alter a roster_merge_result to attempt to remove any
20// conflicts in it. Takes a content_merge_adaptor to pass on to the content
21// merger; used from both the merge-to-database code (below) and the
22// merge-to-workspace "update" code in commands.cc.
23
24struct roster_merge_result;
25struct content_merge_adaptor;
26
27void
28resolve_merge_conflicts(lua_hooks & lua,
29 roster_t const & left_roster,
30 roster_t const & right_roster,
31 roster_merge_result & result,
32 content_merge_adaptor & adaptor);
33
34// traditional resolve-all-conflicts-as-you-go style merging with 3-way merge
35// for file texts
36// throws if merge fails
37// writes out resulting revision to the db, along with author and date certs
38// (but _not_ branch or changelog certs)
39// this version can only be used to merge revisions that are in the db, and
40// that are written straight back out to the db; some refactoring would
41// probably be good
42// 'update' requires some slightly different interface, to deal with the gunk
43// around the revision and its files not being in the db, and the resulting
44// revision and its merged files not being written back to the db
45void
46interactive_merge_and_store(lua_hooks & lua, database & db,
47 revision_id const & left,
48 revision_id const & right,
49 revision_id & merged);
50
51void
52store_roster_merge_result(database & db,
53 roster_t const & left_roster,
54 roster_t const & right_roster,
55 roster_merge_result & result,
56 revision_id const & left_rid,
57 revision_id const & right_rid,
58 revision_id & merged_rid);
59
60// Local Variables:
61// mode: C++
62// fill-column: 76
63// c-file-style: "gnu"
64// indent-tabs-mode: nil
65// End:
66// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
67
68#endif

Archive Download this file

Branches

Tags

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