~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-07-23 21:42:04 UTC
  • mfrom: (1551.15.60 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20070723214204-jwd5cwzvq93wwlgs
bzr checkout -r always works, even with -r0 (#127708)

Show diffs side-by-side

added added

removed removed

Lines of Context:
942
942
            to_location = branch_location
943
943
        source = Branch.open(branch_location)
944
944
        if len(revision) == 1 and revision[0] is not None:
945
 
            revision_id = revision[0].in_history(source)[1]
 
945
            revision_id = _mod_revision.ensure_null(
 
946
                revision[0].in_history(source)[1])
946
947
        else:
947
948
            revision_id = None
948
949
        if to_location is None:
955
956
            try:
956
957
                source.bzrdir.open_workingtree()
957
958
            except errors.NoWorkingTree:
958
 
                source.bzrdir.create_workingtree()
 
959
                source.bzrdir.create_workingtree(revision_id)
959
960
                return
960
961
        try:
961
962
            os.mkdir(to_location)