ensuring commit has enough tests...

John Arbash Meinel john at arbash-meinel.com
Tue Jun 26 14:27:25 BST 2007


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

Robert Collins wrote:
> Ian expressed to me the thought that with the overhaul needed of commit,
> it would be good to expand test coverage there. So this is some notes on
> what full coverage at the API layer probably means - to generate a full
> set of permutations (possibly programmatically) and be sure they are
> covered (at the Tree.commit api level - so each tree type will have this
> tested). In future Commit is possibly best seen as an interaction
> between Tree and Branch, so we may want an inter_tree_branch set of
> tests which would be a final home for these tests.
> 
> So - variables:
> history:
>  - no parents (aka 'null:' left hand parent)
>  - left hand parent
>  - left hand parent and pending merge(s)
>  - left hand parent that is a ghost
>  - left hand parent and a pending merge that is a ghost
> 
> tree shape:
>  - root only
>  - root dir having contents - files, subdirs, symlinks, subtrees
>  - two levels of directories
>  - subtrees that have:
>    - nothing
>    - content
> 
> type of changes since basis:
>  - added paths of each type
>  - removed paths of each type
>  - renames within a directory which sort:
>    - the same order
>    - earlier (e.g. the path that is renamed is now before other content)
>    - later (the opposite of earlier)
>  - renames across directories which sort
>    - same, earlier, later

...

Another thing with renames across directories is that you can rename into a
parent/child. And in the abusive case, you can rename a child to become a parent.

bzr mv a/b b
bzr mv a b/a
bzr commit


I agree that we need something like this properly split up, so that we don't
have to do NxMxOxP permutations.

John
=:->


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

iD8DBQFGgRQ9JdeBCYSNAAMRAtcPAKCWczyPGnr8pDK8WRPfLxRVypyQCgCgodbo
KZ+VHA7gVYIKFPHjh9mnlR0=
=G2zf
-----END PGP SIGNATURE-----



More information about the bazaar mailing list