[PATCH 1 of 3] update: tests for branching
Stuart W. Marks
smarks at smarks.org
Fri Aug 21 06:20:30 UTC 2009
Gilles Moris wrote:
> On Thu August 20 2009 07:57:44 Stuart W Marks wrote:
>> update: tests for branching
>
> You should may be more explicit for this first commit line.
> I am not a native english speaker, so you may find better:
> update: add test cases for all update combinations.
Thanks for your comments. You are correct, I should probably make this more
explicit. Though I'm not sure it should claim to test "all" update
combinations. (See below.)
>> Add test-update-branches to cover cases of 'hg update': to ancestor/
>> descendant, crossing named branches, crossing branches within a named
>> branch; with no option, -c or -C; with or without uncommitted changes;
>> with or without a specific revision. Test only, no behavior change.
>
> "ancestor/descendant": Was your intent to test also updates backward in history?
> I did not see such tests in the patch.
Another good point. The main intent of the test is to test updating across
branches. I threw in the "linear" update case as well but as you observe this
only updates to a descendant but not an ancestor. At this point I'm leaning
toward correct the comment to reflect more accurately what the test actually
does, but I'm willing to add more tests if people think they are useful.
After some further reflection I think it's probably reasonable to cut down the
number of test cases in the third patch. Not only is the behavior of the
cross-named-branches vs same-named-branches the same, but also the -c and -C
options have no effect when the repo has no uncommitted changes. I'd like to
hear reviewers' thoughts on this before proceeding though.
s'marks
More information about the Mercurial-devel
mailing list