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(roster_t const & left_roster,
29 roster_t const & right_roster,
30 roster_merge_result & result,
31 content_merge_adaptor & adaptor,
32 app_state & app);
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(revision_id const & left, revision_id const & right,
47 revision_id & merged, app_state & app);
48
49void
50store_roster_merge_result(roster_t const & left_roster,
51 roster_t const & right_roster,
52 roster_merge_result & result,
53 revision_id const & left_rid,
54 revision_id const & right_rid,
55 revision_id & merged_rid,
56 app_state & app);
57
58// Local Variables:
59// mode: C++
60// fill-column: 76
61// c-file-style: "gnu"
62// indent-tabs-mode: nil
63// End:
64// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
65
66#endif

Archive Download this file

Branches

Tags

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