~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/clone.py

  • Committer: Martin Pool
  • Date: 2005-09-29 13:17:12 UTC
  • mto: (1185.14.2)
  • mto: This revision was merged to the branch mainline in revision 1396.
  • Revision ID: mbp@sourcefrog.net-20050929131712-5b51dc54b3a3f5f5
- factor out stereotyped use of merge to build working dir

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
# all the whole weaves and revisions, rather than getting one
19
19
# revision at a time.
20
20
 
21
 
# TODO: Do we really need to invoke merge() to build the working directory?
22
 
# That seems a bit of an abstraction inversion.
23
 
 
24
21
import sys
25
22
import os
26
23
 
27
 
from bzrlib.merge import merge
 
24
from bzrlib.merge import build_working_dir
28
25
from bzrlib.branch import Branch
29
26
from bzrlib.trace import mutter
30
27
 
57
54
    if revision is None:
58
55
        revision = branch_from.last_revision()
59
56
    br_to.update_revisions(branch_from, stop_revision=revision)
60
 
    merge((to_location, -1), (to_location, 0), this_dir=to_location,
61
 
          check_clean=False, ignore_zero=True)
 
57
    build_working_dir(to_location)
62
58
    br_to.set_parent(branch_from.base)
63
59
    mutter("copied")
64
60
    return br_to