~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-06 23:29:07 UTC
  • mto: (6437.3.4 2.5)
  • mto: This revision was merged to the branch mainline in revision 6441.
  • Revision ID: jelmer@samba.org-20120106232907-oxnp508r63f6ru0l
Change default branch name to "".

Show diffs side-by-side

added added

removed removed

Lines of Context:
2305
2305
        mutter('creating branch reference in %s', a_bzrdir.user_url)
2306
2306
        if a_bzrdir._format.fixed_components:
2307
2307
            raise errors.IncompatibleFormat(self, a_bzrdir._format)
 
2308
        if name is None:
 
2309
            name = a_bzrdir._get_selected_branch()
2308
2310
        branch_transport = a_bzrdir.get_branch_transport(self, name=name)
2309
2311
        branch_transport.put_bytes('location',
2310
2312
            target_branch.user_url)
2445
2447
        """Create new branch object at a particular location."""
2446
2448
        if a_bzrdir is None:
2447
2449
            raise ValueError('a_bzrdir must be supplied')
2448
 
        else:
2449
 
            self.bzrdir = a_bzrdir
 
2450
        if name is None:
 
2451
            raise ValueError('name must be supplied')
 
2452
        self.bzrdir = a_bzrdir
2450
2453
        self._user_transport = self.bzrdir.transport.clone('..')
2451
 
        if name is not None:
 
2454
        if name != "":
2452
2455
            self._user_transport.set_segment_parameter(
2453
2456
                "branch", urlutils.escape(name))
2454
2457
        self._base = self._user_transport.base