Removing tree-references from history to convert subtree to default tree format (cry for help)

Harry Flink to-harry-from-bzrmailinglist at steo.fi
Wed Mar 9 01:18:07 UTC 2011


Hello Bzr folks!


I'd like to upgrade our project from old subtree format to new 2a format
but I cannot figure out any way to do this because old history has some
tree-references. The best solution would be just to delete the unwanted
tree-references altogether from the old history but I dont want to loose
all the history, just the tree-references. I dont mind if I have to once
recreate the tree somehow and loose all the IDs.

Format upgrade is needed for speed and future support.


I have tried to work this out some how for three long days but cannot
figure out any way to do it, so I'm here begging to get any hints.

So far I have tried to fast-import/export but it doesnt work with old
commits where directory is renamed, a file inside the directory is edited
and symlink is renamed to the old directory name - all in same one commit
(yeah, I know, I did stupid :)). I filed a bug report for that
(https://bugs.launchpad.net/bzr-fastimport/+bug/730876) but I'm not sure
if it will be fixed any time soon.


Now I'm trying to learn bzrlib internals for developers and scanned part
of the source code but I think understanding it as a whole will take time.

Do you consider it possible/easy if I try to implement short python
program using bzrlib to read changes from one branch and write them on
another but filtering out tree-references? Any other advice?

If tree was "linear" and contained only modify commits it would be easier
but it contains merges and joins of other trees too so I'm not really
completely sure how to do this.


ps. Thread by subject "Converting subtree format to non-subtree format" is
about same problem but we discussed it last year so I started a new one.

-- 
Best Regards,
Harry Flink





More information about the bazaar mailing list