Code review comment for lp:~philip-peitsch/bzr/annotate-ghost-revs

John A Meinel (jameinel) wrote :

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

Philip Peitsch wrote:
> Hi John,
>
> Ahh... good to know :)
>
> For testing, I have actually been using bzr-svn for generating these. I've attached a script that can produce this problem to bug #393905. I have been running this, then pointing it to the patched bzr and re-running to verify that it no longer crashes.
>
> Do you know of any way to inject one using unit tests or similar? I hadn't looked closely enough at the unit-testing to figure out if there was a straightforward way of doing this, but if you can point me towards any similar tests that may exist (or docs that might help) I'm happy to research it more :)

See:

http://bazaar.launchpad.net/~jameinel/bzr/2.2-create-ghost/revision/5285

For a way to introduce ghosts into the history. It isn't particularly
pretty, but I tested that it works against all repository formats.

That should give you both a text with ghosts, and a revision that is a
ghost.

If you need more history, you can just create another revision (with a
new file text), etc.

This seems like something that would be good to put on a low-level
class, so that we can test ghosts at various levels easily. Mostly
because creating a ghost is ugly/difficult enough, that it is probably
best as a helper function.

Maybe Martin has a good idea of how to put it into a Factory setting.

John
=:->

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

iEYEARECAAYFAkwNYlkACgkQJdeBCYSNAAML1QCfZgFR6P3dWKgGc9gCiBaoEKLC
d5UAoMJOR4mZKQ46/yoVcYLNrb7Jr5ZM
=YZt6
-----END PGP SIGNATURE-----

« Back to merge proposal