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 <set>
14
15#include "app_state.hh"
16#include "vocab.hh"
17#include "roster.hh"
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(revision_id const & left_rid,
29 revision_id const & right_rid,
30 roster_t const & left_roster,
31 roster_t const & right_roster,
32 marking_map const & left_marking_map,
33 marking_map const & right_marking_map,
34 roster_merge_result & result,
35 content_merge_adaptor & adaptor,
36 app_state & app);
37
38// traditional resolve-all-conflicts-as-you-go style merging with 3-way merge
39// for file texts
40// throws if merge fails
41// writes out resulting revision to the db, along with author and date certs
42// (but _not_ branch or changelog certs)
43// this version can only be used to merge revisions that are in the db, and
44// that are written straight back out to the db; some refactoring would
45// probably be good
46// 'update' requires some slightly different interface, to deal with the gunk
47// around the revision and its files not being in the db, and the resulting
48// revision and its merged files not being written back to the db
49void
50interactive_merge_and_store(revision_id const & left, revision_id const & right,
51 revision_id & merged, app_state & app);
52
53void
54store_roster_merge_result(roster_t const & left_roster,
55 roster_t const & right_roster,
56 roster_merge_result & result,
57 revision_id const & left_rid,
58 revision_id const & right_rid,
59 revision_id & merged_rid,
60 app_state & app);
61
62// Local Variables:
63// mode: C++
64// fill-column: 76
65// c-file-style: "gnu"
66// indent-tabs-mode: nil
67// End:
68// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
69
70#endif

Archive Download this file

Branches

Tags

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