1 | <!DOCTYPE html> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <title>FCM: User Guide: Annex: Quick Reference: Tree Conflict Resolution</title> |
---|
5 | <meta name="author" content="FCM team" /> |
---|
6 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
---|
7 | <link rel="icon" href="../etc/fcm-icon.png" type="image/png" /> |
---|
8 | <link rel="shortcut icon" href="../etc/fcm-icon.png" type="image/png" /> |
---|
9 | <link href="../etc/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" /> |
---|
10 | <link href="../etc/fcm.css" rel="stylesheet" media="screen" /> |
---|
11 | </head> |
---|
12 | <body> |
---|
13 | <div class="navbar navbar-inverse"> |
---|
14 | <div class="container-fluid"> |
---|
15 | <div class="navbar-header"> |
---|
16 | <a class="navbar-brand" href=".."><span class="fcm-version">FCM</span></a> |
---|
17 | </div> |
---|
18 | <div class="collapse navbar-collapse"> |
---|
19 | <ul class="nav navbar-nav"> |
---|
20 | <li><a href="../installation/">Installation</a></li> |
---|
21 | |
---|
22 | <li><a class="active" href="#">User Guide</a></li> |
---|
23 | </ul> |
---|
24 | </div> |
---|
25 | </div> |
---|
26 | </div> |
---|
27 | |
---|
28 | <div class="page-header"> |
---|
29 | <div class="fcm-page-content pull-right well well-sm"></div> |
---|
30 | <h1>FCM: User Guide: Annex: Quick Reference: Tree Conflict Resolution</h1> |
---|
31 | </div> |
---|
32 | |
---|
33 | <div class="container"> |
---|
34 | <div class="row"> |
---|
35 | <div class="col-md-12"> |
---|
36 | |
---|
37 | <h2 id="tree:reference:intro">Introduction</h2> |
---|
38 | |
---|
39 | <p>A tree conflict appears in <code>fcm status</code> like this:</p> |
---|
40 | <pre> |
---|
41 | ! C subroutine/hello_sub_dummy.h |
---|
42 | > local missing, incoming edit upon merge |
---|
43 | </pre> |
---|
44 | |
---|
45 | <p>and can require complex action to solve, based on the situation. Happily, |
---|
46 | <code>fcm conflicts</code> automates the resolution of most ordinary tree |
---|
47 | conflicts.</p> |
---|
48 | |
---|
49 | <p>This page is intended to give more information about the meaning of the |
---|
50 | common tree conflicts, and to give guidance on those that aren't handled |
---|
51 | automatically, such as directory tree conflicts.</p> |
---|
52 | |
---|
53 | <p>The list below is ordered by output from <code>fcm status</code>. There |
---|
54 | are two choices that the user must make:</p> |
---|
55 | |
---|
56 | <ul> |
---|
57 | <li><em>keep local</em>: Choose the local branch or revision version of a |
---|
58 | file or directory. Answer <samp>y</samp> in <code>fcm |
---|
59 | conflicts</code>.</li> |
---|
60 | |
---|
61 | <li><em>discard local</em>: Choose the merge branch or other revision |
---|
62 | version of a file or directory. Answer <samp>n</samp> in <code>fcm |
---|
63 | conflicts</code>.</li> |
---|
64 | </ul> |
---|
65 | |
---|
66 | <p>For example, if you are merging the trunk into a working copy of a branch, |
---|
67 | <em>keep local</em> would refer to <strong>keeping</strong> the changes as |
---|
68 | they existed on the branch; <em>discard local</em> would refer to accepting |
---|
69 | the trunk changes and <strong>discarding</strong> the branch ones.</p> |
---|
70 | |
---|
71 | <p>In this page, we use the word <em>local</em> for your local working copy, |
---|
72 | and <em>external</em> for the outside source you are updating or merging in |
---|
73 | from. In the example above, <em>local</em> would mean your working copy of |
---|
74 | the branch; <em>external</em> would mean the trunk.</p> |
---|
75 | |
---|
76 | <p>Subversion implements rename as a copy-and-delete operation. This means a |
---|
77 | rename can show up as a delete (or <em>missing</em>) in the tree conflict |
---|
78 | information.</p> |
---|
79 | |
---|
80 | <p>It's very important to find out if your tree conflict arises from a |
---|
81 | rename, but this information has to be dug out of <code>fcm log</code>. A |
---|
82 | rename can have occurred locally or externally. An external rename would show |
---|
83 | up in <code>fcm status</code> as an addition with history (<samp>A</samp> |
---|
84 | with <samp>+</samp>): for example:</p> |
---|
85 | <pre> |
---|
86 | A + FILENAME |
---|
87 | </pre> |
---|
88 | |
---|
89 | <p><code>fcm log -v FILENAME</code> can be used to examine if this is really |
---|
90 | just a rename - it will show up as FILENAME (from ORIGINAL_FILENAME).</p> |
---|
91 | |
---|
92 | <p>Local renames that have been committed won't show up in <code>fcm |
---|
93 | status</code>. These can still be found using <code>fcm log -v</code> for |
---|
94 | each filename, or you can try to remember what happened!</p> |
---|
95 | |
---|
96 | <h2 id="tree:reference:list">Resolution List</h2> |
---|
97 | |
---|
98 | <p>This section contains specific help on different types of tree |
---|
99 | conflict.</p> |
---|
100 | |
---|
101 | <p>Find the relevant section below by running <code>fcm status</code> and |
---|
102 | looking up the information below the file in conflict - e.g.:</p> |
---|
103 | <pre> |
---|
104 | ! C subroutine/hello_sub_dummy.h |
---|
105 | > local delete, incoming delete upon merge |
---|
106 | </pre> |
---|
107 | |
---|
108 | <p>in this case the <samp>local delete, incoming delete upon merge</samp> is |
---|
109 | the correct section header.</p> |
---|
110 | |
---|
111 | <p>There are some situations not covered below - <samp>local |
---|
112 | obstruction</samp> is not covered here, as it is a case of the user |
---|
113 | corrupting the working copy - try a new checkout. Similarly, <samp>local |
---|
114 | unversioned</samp> is just a case of a problem with something in the working |
---|
115 | copy - an unversioned file or directory exists where Subversion wants to put |
---|
116 | the new stuff. Delete or move it, and try the merge again.</p> |
---|
117 | |
---|
118 | <p>If you know that a rename has happened, use the <samp>(renaming)</samp> |
---|
119 | suffix for your section below. Otherwise, choose the <samp>(no |
---|
120 | renaming)</samp> suffix.</p> |
---|
121 | |
---|
122 | <p><code>fcm resolve</code> always takes the form <code>fcm resolve --accept |
---|
123 | working FILENAME</code> for tree conflicts.</p> |
---|
124 | |
---|
125 | <dl> |
---|
126 | <dt id="add:add"><samp>local add, incoming add upon merge</samp></dt> |
---|
127 | |
---|
128 | <dd> |
---|
129 | <p><dfn>what it means</dfn>: files or directories added with the same |
---|
130 | name independently</p> |
---|
131 | |
---|
132 | <p><dfn>what keep local does</dfn>: uses rename to shuffle the old file |
---|
133 | to a different name, copies the new file in, renames the new file to the |
---|
134 | original name but with a temporary-style suffix (e.g. hello.F90 -> |
---|
135 | hello.F90.xD4r), and again renames the old file to the original name. |
---|
136 | (Then runs <code>fcm resolve</code>).</p> |
---|
137 | |
---|
138 | <p><dfn>what discarding local does</dfn>: renames the old file to give it |
---|
139 | a temporary-style suffix (e.g. hello.F90 -> hello.F90.r6Ys), and |
---|
140 | copies the new file into the original name. (Then runs <code>fcm |
---|
141 | resolve</code>).</p> |
---|
142 | </dd> |
---|
143 | |
---|
144 | <dt id="edit:delete:no_rename"><samp>local edit, incoming delete upon merge |
---|
145 | (no renaming)</samp></dt> |
---|
146 | |
---|
147 | <dd> |
---|
148 | <p><dfn>meaning</dfn>: file or directory modified on the branch locally, |
---|
149 | but deleted on the merge branch</p> |
---|
150 | |
---|
151 | <p><dfn>what keep local does</dfn>: just runs <code>fcm |
---|
152 | resolve</code>.</p> |
---|
153 | |
---|
154 | <p><dfn>what discarding local does</dfn>: deletes the file or directory |
---|
155 | and runs <code>fcm resolve</code>.</p> |
---|
156 | </dd> |
---|
157 | |
---|
158 | <dt id="edit:delete:rename"><samp>local edit, incoming delete upon merge |
---|
159 | (renaming)</samp></dt> |
---|
160 | |
---|
161 | <dd> |
---|
162 | <p><dfn>meaning</dfn>: file modified on branch locally, but renamed on |
---|
163 | merge branch</p> |
---|
164 | |
---|
165 | <p><dfn>what keep local does</dfn>: copies over the renamed file, and the |
---|
166 | common ancestor of the file on the branches, and uses them for a text |
---|
167 | conflict style merge into the old (local) filename. It then removes the |
---|
168 | renamed file and runs <code>fcm resolve</code>.</p> |
---|
169 | |
---|
170 | <p><dfn>what discarding local does</dfn>: copies over the renamed file, |
---|
171 | and the common ancestor of the file on the branches, and uses them for a |
---|
172 | text conflict style merge into the new renamed file. It then deletes the |
---|
173 | old file and runs <code>fcm resolve</code>.</p> |
---|
174 | </dd> |
---|
175 | |
---|
176 | <dt id="edit:replace"><samp>local edit, incoming replace upon |
---|
177 | merge</samp></dt> |
---|
178 | |
---|
179 | <dd> |
---|
180 | <p><dfn>meaning</dfn>: file modified on branch locally, but replaced |
---|
181 | (deleted, and new file added) on merge branch</p> |
---|
182 | |
---|
183 | <p><dfn>what keep local does</dfn>: just runs <code>fcm |
---|
184 | resolve</code>.</p> |
---|
185 | |
---|
186 | <p><dfn>what discarding local does</dfn>: <code>svn delete</code> local |
---|
187 | file, and <code>svn copy</code> the incoming file into it. It then runs |
---|
188 | <code>fcm resolve</code>.</p> |
---|
189 | </dd> |
---|
190 | |
---|
191 | <dt id="delete:delete:no_rename"><samp>local delete, incoming delete upon |
---|
192 | merge (no renaming)</samp></dt> |
---|
193 | |
---|
194 | <dd> |
---|
195 | <p><dfn>meaning</dfn>: same filename deleted both locally and |
---|
196 | externally.</p> |
---|
197 | |
---|
198 | <p><dfn>in both cases</dfn>: just runs <code>fcm resolve</code>.</p> |
---|
199 | </dd> |
---|
200 | |
---|
201 | <dt id="delete:rename:rename"><samp>local delete, incoming delete upon |
---|
202 | merge (just external renaming)</samp></dt> |
---|
203 | |
---|
204 | <dd> |
---|
205 | <p><dfn>meaning</dfn>: file deleted locally, but renamed externally</p> |
---|
206 | |
---|
207 | <p><dfn>what keep local does</dfn>: just runs <code>fcm |
---|
208 | resolve</code>.</p> |
---|
209 | |
---|
210 | <p><dfn>what discarding local does</dfn>: just deletes the new renamed |
---|
211 | file and runs <code>fcm resolve</code>.</p> |
---|
212 | </dd> |
---|
213 | |
---|
214 | <dt id="rename:delete:rename"><samp>local delete, incoming delete upon |
---|
215 | merge (just local renaming)</samp></dt> |
---|
216 | |
---|
217 | <dd> |
---|
218 | <p><dfn>meaning</dfn>: file renamed locally, but deleted externally</p> |
---|
219 | |
---|
220 | <p><dfn>what keep local does</dfn>: just runs <code>fcm |
---|
221 | resolve</code>.</p> |
---|
222 | |
---|
223 | <p><dfn>what discarding local does</dfn>: deletes the local renamed file |
---|
224 | and runs <code>fcm resolve</code>.</p> |
---|
225 | </dd> |
---|
226 | |
---|
227 | <dt id="delete:delete:rename"><samp>local delete, incoming delete upon |
---|
228 | merge (local renaming AND external renaming)</samp></dt> |
---|
229 | |
---|
230 | <dd> |
---|
231 | <p><dfn>meaning</dfn>: same file renamed locally AND externally, to two |
---|
232 | different names.</p> |
---|
233 | |
---|
234 | <p><dfn>what keep local does</dfn>: copies in the external file and |
---|
235 | common ancestor file to construct a text-style merge using |
---|
236 | <code>xxdiff</code> into the locally-renamed filename. Removes the |
---|
237 | external rename and runs <code>fcm resolve</code>.</p> |
---|
238 | |
---|
239 | <p><dfn>what discarding local does</dfn>: copies in the external file and |
---|
240 | common ancestor file to construct a text-style merge using |
---|
241 | <code>xxdiff</code> into the externally-renamed filename. Removes the |
---|
242 | local rename and runs <code>fcm resolve</code>.</p> |
---|
243 | </dd> |
---|
244 | |
---|
245 | <dt id="missing:edit:no_rename"><samp>local missing, incoming edit upon |
---|
246 | merge (no renaming)</samp></dt> |
---|
247 | |
---|
248 | <dd> |
---|
249 | <p><dfn>meaning</dfn>: locally deleted file, add newer file from merge |
---|
250 | branch?</p> |
---|
251 | |
---|
252 | <p><dfn>what keep local does</dfn>: just runs <code>fcm |
---|
253 | resolve</code>.</p> |
---|
254 | |
---|
255 | <p><dfn>what discarding local does</dfn>: copies in the external file |
---|
256 | using its URL and runs <code>fcm resolve</code>.</p> |
---|
257 | </dd> |
---|
258 | |
---|
259 | <dt id="missing:edit:rename"><samp>local missing, incoming edit upon merge |
---|
260 | (renaming)</samp></dt> |
---|
261 | |
---|
262 | <dd> |
---|
263 | <p><dfn>meaning</dfn>: locally renamed file, but external changes to the |
---|
264 | old filename</p> |
---|
265 | |
---|
266 | <p><dfn>what keep local does</dfn>: copies in the external file and |
---|
267 | common ancestor to construct a text-style merge using |
---|
268 | <code>xxdiff</code>, into the locally-renamed filename. Runs <code>fcm |
---|
269 | resolve</code>.</p> |
---|
270 | |
---|
271 | <p><dfn>what discarding local does</dfn>: copies in the external file and |
---|
272 | common ancestor to construct a text-style merge using |
---|
273 | <code>xxdiff</code>, into the original filename. Deletes the |
---|
274 | locally-renamed file and adds the original filename, then runs <code>fcm |
---|
275 | resolve</code>.</p> |
---|
276 | </dd> |
---|
277 | </dl> |
---|
278 | |
---|
279 | </div> |
---|
280 | </div> |
---|
281 | </div> |
---|
282 | |
---|
283 | <hr/> |
---|
284 | <div class="container-fluid text-center"> |
---|
285 | <div class="row"><div class="col-md-12"> |
---|
286 | <address><small> |
---|
287 | © British Crown Copyright 2006-16 |
---|
288 | <a href="http://www.metoffice.gov.uk">Met Office</a>. |
---|
289 | See <a href="../etc/fcm-terms-of-use.html">Terms of Use</a>.<br /> |
---|
290 | This document is released under the British <a href= |
---|
291 | "http://www.nationalarchives.gov.uk/doc/open-government-licence/" rel= |
---|
292 | "license">Open Government Licence</a>.<br /> |
---|
293 | </small></address> |
---|
294 | </div></div> |
---|
295 | </div> |
---|
296 | |
---|
297 | <script type="text/javascript" src="../etc/jquery.min.js"></script> |
---|
298 | <script type="text/javascript" src="../etc/bootstrap/js/bootstrap.min.js"></script> |
---|
299 | <script type="text/javascript" src="../etc/fcm.js"></script> |
---|
300 | <script type="text/javascript" src="../etc/fcm-version.js"></script> |
---|
301 | </body> |
---|
302 | </html> |
---|