~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-10-11 09:26:57 UTC
  • mfrom: (1996.3.37 use_lazy_importer)
  • Revision ID: pqm@pqm.ubuntu.com-20061011092657-e42bec6ef14c036c
(John Arbash Meinel) use lazy importing to improve startup time

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
import os
19
19
import errno
20
 
from tempfile import mkdtemp
21
20
import warnings
22
21
 
 
22
from bzrlib import (
 
23
    osutils,
 
24
    )
23
25
from bzrlib.branch import Branch
24
26
from bzrlib.conflicts import ConflictList, Conflict
25
27
from bzrlib.errors import (BzrCommandError,
37
39
                           )
38
40
from bzrlib.merge3 import Merge3
39
41
import bzrlib.osutils
40
 
from bzrlib.osutils import rename, pathjoin, rmtree
 
42
from bzrlib.osutils import rename, pathjoin
41
43
from progress import DummyProgress, ProgressPhase
42
44
from bzrlib.revision import common_ancestor, is_ancestor, NULL_REVISION
43
45
from bzrlib.textfile import check_text_lines
868
870
        will be dumped, and a will be conflict noted.
869
871
        """
870
872
        import bzrlib.patch
871
 
        temp_dir = mkdtemp(prefix="bzr-")
 
873
        temp_dir = osutils.mkdtemp(prefix="bzr-")
872
874
        try:
873
875
            new_file = pathjoin(temp_dir, "new")
874
876
            this = self.dump_file(temp_dir, "this", self.this_tree, file_id)
888
890
                self._dump_conflicts(name, parent_id, file_id)
889
891
                self._raw_conflicts.append(('text conflict', trans_id))
890
892
        finally:
891
 
            rmtree(temp_dir)
 
893
            osutils.rmtree(temp_dir)
892
894
 
893
895
 
894
896
def merge_inner(this_branch, other_tree, base_tree, ignore_zero=False,