~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to cbranch.py

  • Committer: Adeodato Simó
  • Date: 2006-07-01 21:26:27 UTC
  • mto: This revision was merged to the branch mainline in revision 409.
  • Revision ID: dato@net.com.org.es-20060701212627-cff8927ffb4af78e
Get command objects via get_cmd_object(), instead of directly importing
them from bzrlib.builtins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#    along with this program; if not, write to the Free Software
16
16
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
17
 
18
 
from bzrlib.builtins import cmd_branch, cmd_checkout
 
18
from bzrlib.commands import get_cmd_object
19
19
from bzrlib.config import LocationConfig
20
20
from bzrlib.errors import BzrCommandError
21
21
from bzrlib.osutils import pathjoin, basename, abspath, getcwd
29
29
    if b_root is None:
30
30
        raise BzrCommandError("Can't find cbranch_root in branches.conf")
31
31
    b_loc = pathjoin(b_root, basename(to_location))
32
 
    cmd_branch().run(from_location, b_loc, revision=revision)
33
 
    cmd_checkout().run(b_loc, to_location, lightweight=lightweight)
 
32
    get_cmd_object('branch').run(from_location, b_loc, revision=revision)
 
33
    get_cmd_object('checkout').run(b_loc, to_location, lightweight=lightweight)