cannot reference a remote branch

Bug #829481 reported by Brian de Alwis
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
Fix Released
Medium
Jelmer Vernooij

Bug Description

I have a local git clone:

$ git clone git://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git platform-ui-git

I'm trying to create a bzr branch of the R4_development branch. I have not established a local branch to track the remote. Jelmer advised me to use the "refs=" format, which fails:

$ bzr branch file:$PWD/platform-ui-git,ref=refs%2Fremotes%2Forigin%2FR4_development platform-ui-r4
bzr: ERROR: exceptions.ValueError: unable to map ref refs/remotes/origin/R4_development back to branch name

Traceback (most recent call last):
  File "/scratch/dev/bzr/bzr.dev/bzrlib/commands.py", line 918, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/scratch/dev/bzr/bzr.dev/bzrlib/commands.py", line 1118, in run_bzr
    ret = run(*run_argv)
  File "/scratch/dev/bzr/bzr.dev/bzrlib/commands.py", line 676, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/scratch/dev/bzr/bzr.dev/bzrlib/commands.py", line 698, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/scratch/dev/bzr/bzr.dev/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/scratch/dev/bzr/bzr.dev/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/scratch/dev/bzr/bzr.dev/bzrlib/builtins.py", line 1263, in run
    from_location)
  File "/scratch/dev/bzr/bzr.dev/bzrlib/bzrdir.py", line 919, in open_tree_or_branch
    return bzrdir._get_tree_branch()
  File "/scratch/dev/bzr/bzr.dev/bzrlib/controldir.py", line 425, in _get_tree_branch
    tree = self.open_workingtree()
  File "/Users/bsd/.bazaar/plugins/git/dir.py", line 455, in open_workingtree
    branch = self.open_branch()
  File "/Users/bsd/.bazaar/plugins/git/dir.py", line 415, in open_branch
    return LocalGitBranch(self, repo, ref, self._lockfiles)
  File "/Users/bsd/.bazaar/plugins/git/branch.py", line 434, in __init__
    lockfiles, tagsdict)
  File "/Users/bsd/.bazaar/plugins/git/branch.py", line 315, in __init__
    self.name = ref_to_branch_name(ref)
  File "/Users/bsd/.bazaar/plugins/git/refs.py", line 90, in ref_to_branch_name
    raise ValueError("unable to map ref %s back to branch name" % ref)
ValueError: unable to map ref refs/remotes/origin/R4_development back to branch name

bzr 2.5.0dev1 on python 2.6.2 (Darwin-11.1.0-x86_64-i386-32bit)
arguments: ['/scratch/dev/bzr/bzr.dev/bzr', 'branch',
    'file:/Users/bsd/Manumitting/Projects/e4/platform-ui-
    git,ref=refs%2Fremotes%2Forigin%2FR4_development', 'platform-ui-r4']
plugins: automv[unknown], bash_completion[1.2.1dev], bisect[1.1.0dev],
    changelog_merge[2.5.0dev1], clear_exec_bit[unknown], colo[0.2.0dev],
    diffstat[0.2.0], extmerge[unknown], git[0.6.2], grep[0.4.0],
    keywords[unknown], launchpad[2.5.0dev1], log_deleted[unknown],
    mail_app[0.9.0], multiparent[unknown], netrc_credential_store[2.5.0dev1],
    news_merge[2.5.0dev1], pipeline[1.1.0], prompt_repack[unknown],
    rewrite[0.7.0dev], shell_hooks[1.0.0dev], sprout[0.9.0dev], svn[1.1.0dev],
    weave_fmt[2.5.0dev1], xmloutput[0.8.7dev]
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_CA.UTF-8'

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.
bzr: warning: some compiled extensions could not be loaded; see <https://answers.launchpad.net/bzr/+faq/703>

Tags: colocated

Related branches

Jelmer Vernooij (jelmer)
Changed in bzr-git:
status: New → Triaged
importance: Undecided → Medium
tags: added: colocated
Jelmer Vernooij (jelmer)
Changed in bzr-git:
assignee: nobody → Jelmer Vernooij (jelmer)
milestone: none → 0.6.3
status: Triaged → Fix Released
status: Fix Released → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-git:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.