Converting 1.9-rich-root to 1.9

Asked by Parth Malwankar

Hello,

IIUC repository format 1.9 is more efficient than 1.9-rich-root over dumb protocols like sftp. When I try to upgrade from 1.9-rich-root (I happen to have this after importing a svn repo) I get the following error.

[parth:bzr-test]% bzr init --1.9-rich-root
Standalone tree (format: 1.9-rich-root)
Location:
  branch root: .
[parth:bzr-test]% bzr upgrade --1.9
starting upgrade of file:///home/parth/tmp/bzr-test/
making backup of tree history
file:///home/parth/tmp/bzr-test/.bzr has been backed up to file:///home/parth/tmp/bzr-test/backup.bzr
if conversion fails, you can move this directory back to .bzr
if it succeeds, you can remove this directory if you wish
starting repository conversion
bzr: ERROR: Cannot convert to format <RepositoryFormatKnitPack6>. Does not support rich root data.
[parth:bzr-test]%

Is it possible to convert from 1.9-rich-root to 1.9? Am I correct in understanding that its beneficial to use 1.9 if I don't plan to use svn?

I am using bzr 1.11.

Thanks very much.
Parth

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Matt Nordhoff
Solved:
Last query:
Last reply:
Revision history for this message
Matt Nordhoff (mnordhoff) said :
#1

It's not possible to convert from a rich-root format such as
1.9-rich-root to a non-rich-root format such as 1.9.

Rich-root formats add a little bit of metadata. It's not complicated,
and has practically no impact on performance, but it's not possible to
represent it in a non-rich-root format, so bzr won't let you downgrade
and throw the data out.

IIRC, if you pull from a non-rich-root repository into a rich-root
repository, it will be slower, because bzr has to go add the metadata to
each revision and reserialize it. (Only the conversion itself is slow;
other operations will be fine.) But doing that is a bad idea anyway,
because since you can't convert back down, you won't be able to push
back to the non-rich-root repository. If you need to do that, the only
options then are to upgrade the other repository (forcing everybody
*else* who has a copy of it to upgrade too), or throw out your revisions
and recommit in a different, non-rich-root repository.

(This hassle is why rich-roots haven't been forced on everybody yet, by
the way.)

Hope this made sense,
Matt Nordhoff

Revision history for this message
Parth Malwankar (parthm) said :
#2

Thanks Matt. I think I understand 1.9 and 1.9-rich-root much better.

In my case I don't really plan to use svn at all now that I have imported my data. But it seems I really don't have a choice of moving to 1.9.
Am I losing out on something? Performance? Disk space?

From the "bzr help formats" it appears to me 1.9 might be faster. Is this correct?
Quote
"""
* If you are using bzr-svn to interoperate with a Subversion
  repository, use 1.9-rich-root.

* If you are working on a project with big trees (5000+ paths)
  or deep history (5000+ revisions), use 1.9.
"""

Revision history for this message
Best Matt Nordhoff (mnordhoff) said :
#3

No. 1.9 and 1.9-rich-root are completely identical, aside from one supporting rich-roots. Storing the extra data probably uses a few KB of disk space, but aside from that, performance and disk usage will be identical.

Revision history for this message
Parth Malwankar (parthm) said :
#4

Thanks very much for for your help Matt.
Its good to know that I am not missing out on the format related goodies :)

Revision history for this message
Parth Malwankar (parthm) said :
#5

Thanks Matt Nordhoff, that solved my question.