~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to cbranch.py

  • Committer: Alexander Belchenko
  • Date: 2006-07-18 20:37:53 UTC
  • mto: This revision was merged to the branch mainline in revision 421.
  • Revision ID: bialix@ukr.net-20060718203753-fa30c2f3cc59316b
don't use curses on win32

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.branch import Branch
19
18
from bzrlib.builtins import cmd_branch, cmd_checkout
20
19
from bzrlib.config import LocationConfig
21
20
from bzrlib.errors import BzrCommandError
22
21
from bzrlib.osutils import pathjoin, basename, abspath, getcwd
23
 
from bzrlib.urlutils import local_path_to_url
24
22
 
25
23
def cbranch(from_location, to_location=None, revision=None, lightweight=False):
26
24
    from_location = from_location.rstrip('/')
33
31
    b_loc = pathjoin(b_root, basename(to_location))
34
32
    cmd_branch().run(from_location, b_loc, revision=revision)
35
33
    cmd_checkout().run(b_loc, to_location, lightweight=lightweight)
36
 
    b = Branch.open(to_location)