26
26
present the conflicting versions, and it's up to you to find the correct
29
Whatever the conflict is, resolving it is roughly done in two steps:
31
1. Modify the working tree content so that the conflicted item is now in the
32
state you want to keep, then
34
2. Inform Bazaar that the conflict is now solved and ask to cleanup any
29
Whatever the conflict is, resolving it is roughly done in two steps::
31
- modify the working tree content so that the conflicted item is now in the
32
state you want to keep,
34
- inform Bazaar that the conflict is now solved and ask to cleanup any
35
35
remaining generated information (``bzr resolve <item>``).
37
37
For most conflict types, there are some obvious ways to modify the working
88
88
The correct resolution would be "Martin Pool released Bazaar."
90
You can handle text conflicts either by editing the main copy of the file,
91
or by invoking external tools on the THIS, OTHER and BASE versions. It's
92
worth mentioning that resolving text conflicts rarely involves picking one
93
set of changes over the other (but see below when you encounter these
94
cases). More often, the two sets of changes must be intelligently combined.
90
You can handle text conflicts either by editing the main copy of the file, or
91
by invoking external tools on the THIS, OTHER and BASE versions. It's worth
92
mentioning that resolving text conflicts rarely involves picking one set of
93
changes over the other. More often, the two sets of changes must be
94
intelligently combined.
96
96
If you edit the main copy, be sure to remove the herringbone markers. When
97
97
you are done editing, the file should look like it never had a conflict, and be
104
104
``.BASE``, ``.THIS`` and ``.OTHER`` files if they are still present in the
108
When you want to pick one set of changes over the other, you can use ``bzr
109
resolve`` with one of the following actions:
111
* ``--action=take-this`` will issue ``mv FILE.THIS FILE``,
112
* ``--action=take-other`` will issue ``mv FILE.OTHER FILE``.
114
Note that if you have modified ``FILE.THIS`` or ``FILE.OTHER``, these
115
modifications will be taken into account.
117
107
Content conflicts
118
108
-----------------
137
127
``bzr resolve`` recognizes the following actions:
139
* ``--action=take-this`` will issue ``bzr mv FILE.THIS FILE``,
140
* ``--action=take-other`` will issue ``bzr mv FILE.OTHER FILE``,
141
* ``--action=done`` will just mark the conflict as resolved.
129
- ``--action=take-this`` will issue ``bzr mv FILE.THIS FILE``,
130
- ``--action=take-other`` will issue ``bzr mv FILE.OTHER FILE``,
131
- ``--action=done`` will just mark the conflict as resolved.
143
133
Any action will also delete the previously generated ``.BASE``, ``.THIS`` and
144
134
``.OTHER`` files if they are still present in the working tree.
182
172
To resolve that kind of conflict, you should rebuild FILE from either version
183
173
or a combination of both.
185
``bzr resolve`` recognizes the following actions:
175
``bzr resolve`` recognizes the following actions::
187
* ``--action=take-this`` will issue ``bzr rm FILE ; bzr mv FILE.moved FILE``,
188
* ``--action=take-other`` will issue ``bzr rm FILE.moved``,
189
* ``--action=done`` will just mark the conflict as resolved.
177
- ``--action=take-this`` will issue ``bzr rm FILE ; bzr mv FILE.moved FILE``,
178
- ``--action=take-other`` will issue ``bzr rm FILE.moved``,
179
- ``--action=done`` will just mark the conflict as resolved.
191
181
Note that you must get rid of FILE.moved before using ``--action=done``.
223
213
To resolve that kind of conflict, you should either remove or rename the
224
214
children or the directory or a combination of both.
226
``bzr resolve`` recognizes the following actions:
216
``bzr resolve`` recognizes the following actions::
228
* ``--action=take-this`` will issue ``bzr rm directory`` including the
230
* ``--action=take-other`` will acknowledge Bazaar choice to keep the children
231
and restoring the directory,
232
* ``--action=done`` will just mark the conflict as resolved.
218
- ``--action=take-this`` will issue ``bzr rm directory`` including the
220
- ``--action=take-other`` will acknowledge Bazaar choice to keep the children
221
and restoring the directory,
222
- ``--action=done`` will just mark the conflict as resolved.
234
224
Bazaar cannot auto-detect when conflicts of this kind have been resolved.
241
231
Conflict: can't delete DIR because it is not empty. Not deleting.
243
233
This is the opposite of "missing parent". A directory is deleted in the
244
source, but has new children in the target (either because a directory
245
deletion is merged or because the merge introduce new children). Bazaar
246
will retain the directory. Resolving this issue depends very much on the
234
source, but has new children in the target. Bazaar will retain the directory.
235
Resolving this issue depends very much on the particular scenario.
249
237
To resolve that kind of conflict, you should either remove or rename the
250
238
children or the directory or a combination of both.
252
``bzr resolve`` recognizes the following actions:
254
* ``--action=take-this`` will acknowledge Bazaar choice to keep the directory,
256
* ``--action=take-other`` will issue ``bzr rm directory`` including the
259
* ``--action=done`` will just mark the conflict as resolved.
261
Note that when merging a directory deletion, if unversioned files are
262
present, they become potential orphans has they don't have a directory
265
Handling such orphans, *before* the conflict is created, is controlled by
266
setting the ``bzr.transform.orphan_policy`` configuration option.
268
There are two possible values for this option:
270
* ``conflict`` (the default): will leave the orphans in place and
271
generate a conflicts,
273
* ``move``: will move the orphans to a ``bzr-orphans`` directory at the root
274
of the working tree with names like ``<file>.~#~``.
240
``bzr resolve`` recognizes the following actions::
242
- ``--action=take-this`` will acknowledge Bazaar choice to keep the directory,
243
- ``--action=take-other`` will issue ``bzr rm directory`` including the
245
- ``--action=done`` will just mark the conflict as resolved.
276
247
Bazaar cannot auto-detect when conflicts of this kind have been resolved.
288
259
To resolve that kind of conflict, you just have to decide what name should be
289
260
retained for the file involved.
291
``bzr resolve`` recognizes the following actions:
262
``bzr resolve`` recognizes the following actions::
293
* ``--action=take-this`` will revert Bazaar choice and keep ``PATH1`` by
294
issuing ``bzr mv PATH2 PATH1``,
295
* ``--action=take-other`` will acknowledge Bazaar choice of keeping ``PATH2``,
296
* ``--action=done`` will just mark the conflict as resolved.
264
- ``--action=take-this`` will revert Bazaar choice and keep ``PATH1`` by
265
issuing ``bzr mv PATH2 PATH1``,
266
- ``--action=take-other`` will acknowledge Bazaar choice of keeping ``PATH2``,
267
- ``--action=done`` will just mark the conflict as resolved.
298
269
Bazaar cannot auto-detect when conflicts of this kind have been resolved.
323
294
``black``. To resolve that kind of conflict, you just have to decide what
324
295
name should be retained for the directories involved.
326
``bzr resolve`` recognizes the following actions:
297
``bzr resolve`` recognizes the following actions::
328
* ``--action=take-this`` will acknowledge Bazaar choice of leaving ``white``
330
* ``--action=take-other`` will revert Bazaar choice and move ``black`` in
299
- ``--action=take-this`` will acknowledge Bazaar choice of leaving ``white``
301
- ``--action=take-other`` will revert Bazaar choice and move ``black`` in
331
302
``white`` by issuing ``bzr mv black/white white ; bzr mv black white``,
332
* ``--action=done`` will just mark the conflict as resolved.
303
- ``--action=done`` will just mark the conflict as resolved.
334
305
Bazaar cannot auto-detect when conflicts of this kind have been resolved.
358
329
To resolve that kind of conflict, you have to decide what name should be
359
330
retained for the file, directory or symlink involved.
361
``bzr resolve`` recognizes the following actions:
332
``bzr resolve`` recognizes the following actions::
363
* ``--action=take-this`` will issue ``bzr rm --force foo.new`` and
365
* ``--action=take-other`` will issue ``bzr rm --force foo`` and
366
``bzr mv foo.new foo``,
367
* ``--action=done`` will just mark the conflict as resolved.
334
- ``--action=take-this`` will issue ``bzr rm --force foo.new`` and
336
- ``--action=take-other`` will issue ``bzr rm --force foo`` and
337
``bzr mv foo.new foo``,
338
- ``--action=done`` will just mark the conflict as resolved.
369
340
Bazaar cannot auto-detect when conflicts of this kind have been resolved.