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 | ␊ |
15 | class app_state;␊ |
16 | class roster_t;␊ |
17 | ␊ |
18 | // Destructively alter a roster_merge_result to attempt to remove any␊ |
19 | // conflicts in it. Takes a content_merge_adaptor to pass on to the content␊ |
20 | // merger; used from both the merge-to-database code (below) and the␊ |
21 | // merge-to-workspace "update" code in commands.cc.␊ |
22 | ␊ |
23 | struct roster_merge_result;␊ |
24 | struct content_merge_adaptor;␊ |
25 | ␊ |
26 | void␊ |
27 | resolve_merge_conflicts(roster_t const & left_roster,␊ |
28 | roster_t const & right_roster,␊ |
29 | roster_merge_result & result,␊ |
30 | content_merge_adaptor & adaptor,␊ |
31 | app_state & app);␊ |
32 | ␊ |
33 | // traditional resolve-all-conflicts-as-you-go style merging with 3-way merge␊ |
34 | // for file texts␊ |
35 | // throws if merge fails␊ |
36 | // writes out resulting revision to the db, along with author and date certs␊ |
37 | // (but _not_ branch or changelog certs)␊ |
38 | // this version can only be used to merge revisions that are in the db, and␊ |
39 | // that are written straight back out to the db; some refactoring would␊ |
40 | // probably be good␊ |
41 | // 'update' requires some slightly different interface, to deal with the gunk␊ |
42 | // around the revision and its files not being in the db, and the resulting␊ |
43 | // revision and its merged files not being written back to the db␊ |
44 | void␊ |
45 | interactive_merge_and_store(revision_id const & left, revision_id const & right,␊ |
46 | revision_id & merged, app_state & app);␊ |
47 | ␊ |
48 | void␊ |
49 | store_roster_merge_result(roster_t const & left_roster,␊ |
50 | roster_t const & right_roster,␊ |
51 | roster_merge_result & result,␊ |
52 | revision_id const & left_rid,␊ |
53 | revision_id const & right_rid,␊ |
54 | revision_id & merged_rid,␊ |
55 | app_state & app);␊ |
56 | ␊ |
57 | // Local Variables:␊ |
58 | // mode: C++␊ |
59 | // fill-column: 76␊ |
60 | // c-file-style: "gnu"␊ |
61 | // indent-tabs-mode: nil␊ |
62 | // End:␊ |
63 | // vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:␊ |
64 | ␊ |
65 | #endif␊ |