[MERGE] Shelf 3 / 5: Unshelver and metadata

John Arbash Meinel john at arbash-meinel.com
Mon Oct 20 22:22:47 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Bentley wrote:
> Hi all,
> 
> This patch implements the Unshelver class, which can make a Merger that
> will unshelve the changes.  It also adds some additional metadata to
> shelf files: a revision-id record to indicate which tree the Transform
> should be applied to, and an optional user-specified message.
> 
> The shelved TreeTransform cannot be applied directly to the WorkingTree,
> because its contents may have changed.  Instead, 3-way merge is
> performed with:
> THIS: The working tree
> BASE: The TreeTransform basis revision
> OTHER: The TreeTransform's PreviewTree.
> 
> (Actually, some invocations of "unshelve2" will not apply the changes to
> the tree.  They will use a PreviewTree generated from the merge.  This
> is why Unshelver doesn't do the unshelving directly.)
> 
> Aaron

...

+        assert names[0] == ('metadata',)

You may want to run:

bzr selftest -s bt.test_source

As it will catch any 'assert' entries left in the code.

Since this is validating something on disk, it feels like we want
something stronger than "AssertionError". If it is wrong, we have a
corrupted/unreadable file, not just a programmer error.

It seems like we want an error better than a Assert traceback shown to
the user, as well.

BB:tweak

Is your idea that alternate unshelvers would subclass and then override
make_merger()?

I know that the shelf plugin allowed you to edit the hunks both going to
the shelf and coming back. Are you thinking to keep that or just going
one way?

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkj89qcACgkQJdeBCYSNAANX1wCfa1sadyRvZzMlNdQrr2wIH9Yy
WU8AnRYw25W5LG4Vzsy7Yffw5tY1jKrp
=Br1I
-----END PGP SIGNATURE-----



More information about the bazaar mailing list