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
- 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
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
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, 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.
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.
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.
107
117
Content conflicts
108
118
-----------------
127
137
``bzr resolve`` recognizes the following actions:
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.
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.
133
143
Any action will also delete the previously generated ``.BASE``, ``.THIS`` and
134
144
``.OTHER`` files if they are still present in the working tree.
172
182
To resolve that kind of conflict, you should rebuild FILE from either version
173
183
or a combination of both.
175
``bzr resolve`` recognizes the following actions::
185
``bzr resolve`` recognizes the following actions:
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.
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.
181
191
Note that you must get rid of FILE.moved before using ``--action=done``.
213
223
To resolve that kind of conflict, you should either remove or rename the
214
224
children or the directory or a combination of both.
216
``bzr resolve`` recognizes the following actions::
226
``bzr resolve`` recognizes the following actions:
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.
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.
224
234
Bazaar cannot auto-detect when conflicts of this kind have been resolved.
231
241
Conflict: can't delete DIR because it is not empty. Not deleting.
233
243
This is the opposite of "missing parent". A directory is deleted in 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.
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
237
249
To resolve that kind of conflict, you should either remove or rename the
238
250
children or the directory or a combination of both.
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.
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>.~#~``.
247
276
Bazaar cannot auto-detect when conflicts of this kind have been resolved.
259
288
To resolve that kind of conflict, you just have to decide what name should be
260
289
retained for the file involved.
262
``bzr resolve`` recognizes the following actions::
291
``bzr resolve`` recognizes the following actions:
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.
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.
269
298
Bazaar cannot auto-detect when conflicts of this kind have been resolved.
294
323
``black``. To resolve that kind of conflict, you just have to decide what
295
324
name should be retained for the directories involved.
297
``bzr resolve`` recognizes the following actions::
326
``bzr resolve`` recognizes the following actions:
299
- ``--action=take-this`` will acknowledge Bazaar choice of leaving ``white``
301
- ``--action=take-other`` will revert Bazaar choice and move ``black`` in
328
* ``--action=take-this`` will acknowledge Bazaar choice of leaving ``white``
330
* ``--action=take-other`` will revert Bazaar choice and move ``black`` in
302
331
``white`` by issuing ``bzr mv black/white white ; bzr mv black white``,
303
- ``--action=done`` will just mark the conflict as resolved.
332
* ``--action=done`` will just mark the conflict as resolved.
305
334
Bazaar cannot auto-detect when conflicts of this kind have been resolved.
329
358
To resolve that kind of conflict, you have to decide what name should be
330
359
retained for the file, directory or symlink involved.
332
``bzr resolve`` recognizes the following actions::
361
``bzr resolve`` recognizes the following actions:
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.
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.
340
369
Bazaar cannot auto-detect when conflicts of this kind have been resolved.