Merging folders

Vincent Ladeuil vila+bzr at
Thu Feb 23 08:57:21 UTC 2012

>>>>> Stefan Monnier <monnier at> writes:

    >>> "bzr.transform.orphan_policy = move" sounds intriguing.  What does
    >>> it do?
    >> It moves unversioned and ignored files into ./bzr-orphan directory of
    >> your tree.

    > That's what I read earlier, but I don't know what it means.
    > More specifically, under which circumstances does it do that?

$ bzr help bzr.transform.orphan_policy
Policy for orphaned files during transform operations.

The following values are supported:
 conflict - Leave orphans in place and create a conflict on the directory.
 move - Move orphans into the bzr-orphans directory.

Yeah, not super clear :-/

So, what bzr call a 'transform tree' is a representation of a tree and
some 'transformations', applying a merge to a basis tree for example.

This is the internal structure used to produce the resulting tree,
including the conflicts.

The case of interest here is when a directory is about to be removed,
its children, if they are not versioned are moved out of the way: they
don't have a parent anymore and become orphans (their parent directory
have ceased to exist).

'bzr.transform.orphan_policy' controls what should be done in this case.

It hasn't been turned on by default when introduced because we want to
also introduce a distinction between junk and precious files which would
allow deleting the junk files (*.o, *.pyc for example). This should
reduce the problematic cases by always deleting junk files and always
conflicting for precious files. 'move' could still be useful but will
become more of an edge case.


More information about the bazaar mailing list