[MERGE] loosen the constraints on WorkingTree.set_last_revision.

Aaron Bentley aaron.bentley at utoronto.ca
Tue Aug 8 00:07:51 BST 2006


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

Robert Collins wrote:
> Heres the dirty little secret from baz-import. When it imports something
> whose origin history is not available, it does (roughly)
> t = init
> t.set_pending_merges([inaccessible_first_parent])
> t.set_inventory()
> t.commit()
> 
> And *due to a bug in commit* this gets recorded in such a way that
> loading the revision back from disk gives [inaccessible_first_parent] as
> the list of parent_ids.

Heh, right.  I'd forgotten that one.  For some reason, though, it
doesn't bother me at all to set a pending_merge to a ghost, and it
bothers me greatly to set the last_revision to a ghost.

Setting last_revision to a ghost we no longer consider it illegal for a
working tree to refer to a revision not present in a branch.  Which
means it's no longer safe to purge revisions from a repo when they're
not referenced by the branches it contains.

Could we look at allowing the parent list to be overridden at commit
time, rather than doing this?  That seems like the direct approach, to me.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE18fH0F+nu1YWqI0RAm5VAJ9cShfZqNMuoQ+bdsOoGGsuiF8UCQCaAyZY
1t7TRoGax8gp8i2zvTtEkXE=
=u3Tu
-----END PGP SIGNATURE-----




More information about the bazaar mailing list