Executing bzr heads fails with central branch is unreachable?

Vincent Ladeuil v.ladeuil+lp at free.fr
Thu Nov 14 07:44:35 UTC 2013


>>>>> ckalisiak  <ckalisiak at attotech.com> writes:

    > Hello all,

    >    I unintentionally overwrote some commits in the task branch in my local
    > shared repository with "bzr pull --overwrite",

This should have emitted a message telling you how to recover your
former tip (unfortunately this message is not recorded in ~/.bzr.log...).

    > so I'm attempting to execute a "bzr heads --dead-only" to
    > determine the revision I need to revert to.

    > However, it appears that every branch that we've either moved from one
    > folder to another within the central repository, or removed from the
    > central repository, causes "heads" to fail with the emitted error "Central
    > branch [branch name] is unreachable."

Most probably caused by a plugin (*central* branch does not sound
distributed ;)

So you want to disable plugins.

Ha, but heads is part of bzrtools, a plugin.

More advanced magic needed...

You want to enable the bzrtools plugin only (well, keeping the core
plugins won't hurt ;).

$ bzr plugins -v
...
bzrtools 2.6.0
  Various useful commands for working with bzr.
   /home/vila/.bazaar/plugins/bzrtools
...

The bzrtools plugin I use is from the directory displayed above, so:

$ BZR_PLUGINS_AT=bzrtools@/home/vila/.bazaar/plugins/bzrtools BZR_PLUGIN_PATH=-site bzr plugins -v

Adapt the above with the output of the first 'bzr plugins -v' to match
your installation and that second 'bzr plugins -v' should now list only
the core plugins and bzrtools.

Now:

$ BZR_PLUGINS_AT=bzrtools@/home/vila/.bazaar/plugins/bzrtools BZR_PLUGIN_PATH=-site bzr heads

should work.

    > This error message is not related to the contents of the
    > branch.conf file; it appears that the repository remembers that a
    > branch by that name existed at some point, and because the branch
    > is no longer present, it won't complete the "heads" operation.

You may want to investigate which plugin is causing that, 'bzr plugins
-v' should give you enough hints.

    Vincent



More information about the bazaar mailing list