bzr-svn frequently asked questions
==================================

.. contents::

Trying to branch into repository gives an error about incompatibility.
----------------------------------------------------------------------
Creating a repository and then trying to clone a Subversion branch into 
that repository may cause the following error:

::

  bzr: ERROR: Repository KnitRepository is not compatible with repository SvnRepository

bzr-svn requires a repository format that supports recording root file ids. To 
upgrade the repository, run: 

::

 $ bzr upgrade --rich-root-pack

Pushing a branch that didn't exist in Subversion yet with `bzr push` fails.
---------------------------------------------------------------------------
At the moment, only `bzr svn-push` can be used to push new branches into 
Subversion. Future releases will include this functionality in `bzr push`.

More information can be found in the bug report at:
https://bugs.launchpad.net/bzr-svn/+bug/127945.

Cloning a large Subversion branch is very slow
----------------------------------------------
There is no way around this at the moment, because Bazaar has to import all 
the history from the Subversion branch.

Alternatively, you may want to just check out the tip of the Subversion branch
and access the earlier revisions only when necessary by using stacked branches,
e.g.::

 $ bzr branch --stacked svn://svn.gnome.org/svn/gnome-specimen/trunk

The Bazaar revno's differ from the Subversion revno's
-----------------------------------------------------
That's right. Bazaar revision numbers are per-branch, whereas Subversion 
revno's are per-repository. If you would like to use Subversion revision 
numbers, use the "svn:" revision specifier. For example:

::

  $ bzr ls -rsvn:34 svn://example.com/bar

bzr log will also show the Subversion revision number.

After upgrading bzr-svn, Bazaar reports branches have diverged while pulling, when they haven't
-----------------------------------------------------------------------------------------------
As of version 0.4, bzr-svn creates revisions with different revision ids than 
previous versions. In other words, existing bzr-svn branches created with 
0.3.x can not be used directly with 0.4.0 but will have to be upgraded to 
work with 0.4.0 using the "bzr svn-upgrade" command. The bzr-rebase package 
has to be installed for this command to work correctly.

Is it possible to keep the author name when pushing changes into Subversion?
----------------------------------------------------------------------------
Yes, but this requires the repository to allow revision property changes. 

See hooks/pre-revprop-change in the Subversion repository for 
more information about how to do this.

You also need to enable support for this in bzr-svn by setting 
``override-svn-revprops`` to True in ~/.bazaar/bazaar.conf.

I converted my Subversion repository using svn-import, but now all branches are empty!
--------------------------------------------------------------------------------------

bzr-svn does not create working trees by default. If you need 
the working trees, run "bzr checkout" in the branch or 
specify --trees to svn-import.

bzr-svn did a replace operation on the branch I pushed to when I tried to push a merge commit to Subversion
-----------------------------------------------------------------------------------------------------------
Yes, this is because bzr-svn has to preserve the mainline history of your Bazaar
branch in Subversion. 

If you would like to avoid this, use a checkout and merge into that ("bzr co") 
or rebase on trunk rather than merging it. 

For example::

 $ bzr push ../trunk
 bzr: ERROR: These branches have diverged.  Try using "merge" and then "push".
 $ bzr rebase ../trunk
 All changes applied successfully.
 ...
 $ bzr push ../trunk
 All changes applied successfully.
 Pushed up to revision 1075.

If you would like to forbid Bazaar from ever doing these replace operations, set the 
``append_revisions_only`` setting to True for the repository you're 
pushing to.

bzr-svn sets all kinds of file properties when pushing revisions into Subversion. Is this really necessary?
-----------------------------------------------------------------------------------------------------------
Yes, this is because bzr-svn actually supports pushing to Subversion
retaining the exact same history that is in the Bazaar branch 
you're pushing. These properties are used for storing Bazaar metadata that 
can not be losslessly mapped to existing Subversion metadata. 

It is possible to push changes to Subversion without
setting that metadata by using the ``bzr dpush`` command. 
Since revisions created in Subversion this way are actually (slightly) 
different from the matching revisions in the local branch, it is necessary for 
the dpush command to rebase your branch to the remote branch after pushing.

You would get a DivergedBranches error when pulling from a svn branch you have 
just pushed to. 

We have considered setting revision properties with this metadata
rather than file properties so they don't show up in "svn diff" but
that requires more work in bzr-svn. Being able to set custom revision
properties also depends on Subversion 1.5 on the server or modification of the 
default repository hooks.

If you are using trac, you can get it to ignore these file properties by 
setting	the ``hide_properties`` setting in the browser section of your 
configuration to a list of properties that should not be displayed by trac, 
e.g.::

  [browser]
  hide_properties = svk:merge, bzr:file-ids, bzr:merge, bzr:revision-info

Is it possible to not use the on-disk cache?
--------------------------------------------

Yes, simply set ``use-cache = False`` for the repository in question in 
~/.bazaar/subversion.conf.  This will of course have some consequences for the 
performance of bzr-svn since it will have to re-fetch data.

..
	vim: ft=rest
