/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Martin Pool
  • Date: 2005-08-05 20:00:14 UTC
  • Revision ID: mbp@sourcefrog.net-20050805200014-75236893f666c4bb
- basic rules for hacking bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from merge_core import merge_flex, ApplyMerge3, BackupBeforeChange
2
 
from changeset import generate_changeset, ExceptionConflictHandler
3
 
from changeset import Inventory, Diff3Merge
 
1
from bzrlib.merge_core import merge_flex, ApplyMerge3, BackupBeforeChange
 
2
from bzrlib.changeset import generate_changeset, ExceptionConflictHandler
 
3
from bzrlib.changeset import Inventory, Diff3Merge
4
4
from bzrlib import find_branch
5
5
import bzrlib.osutils
6
6
from bzrlib.errors import BzrCommandError
11
11
import shutil
12
12
import errno
13
13
 
 
14
 
 
15
# comments from abentley on irc: merge happens in two stages, each
 
16
# of which generates a changeset object
 
17
 
 
18
# stage 1: generate OLD->OTHER,
 
19
# stage 2: use MINE and OLD->OTHER to generate MINE -> RESULT
 
20
 
14
21
class UnrelatedBranches(BzrCommandError):
15
22
    def __init__(self):
16
23
        msg = "Branches have no common ancestor, and no base revision"\
19
26
 
20
27
 
21
28
class MergeConflictHandler(ExceptionConflictHandler):
22
 
    """Handle conflicts encountered while merging"""
 
29
    """Handle conflicts encountered while merging.
 
30
 
 
31
    This subclasses ExceptionConflictHandler, so that any types of
 
32
    conflict that are not explicitly handled cause an exception and
 
33
    terminate the merge.
 
34
    """
23
35
    def __init__(self, dir, ignore_zero=False):
24
36
        ExceptionConflictHandler.__init__(self, dir)
25
37
        self.conflicts = 0