[PATCH v3] commit: amending with --close-branch (issue3445)

Kevin Bullock kbullock+mercurial at ringworld.org
Mon May 13 15:57:06 CDT 2013


On 13 May 2013, at 2:17 PM, Iulian Stana wrote:

> I think that I didn't understand clearly the idea....
> You said that there is a problem with 'hg init, does this mean that I must put my test on the file without 
> using  'hg init' ? Is this all that I have to do or there is anything else that I must do for this bug?

The goal is to test your new code as _minimally as possible_. That means at least two things:

1. Don't test code paths that are already tested elsewhere. For example, your simple "Correct close with commit" test tests code that is already covered at <http://www.selenic.com/hg/file/12459bfa4b59/tests/test-branches.t#l251>, <http://www.selenic.com/hg/file/12459bfa4b59/tests/test-branches.t#l257>, <http://www.selenic.com/hg/file/12459bfa4b59/tests/test-branches.t#l259>, and <http://www.selenic.com/hg/file/12459bfa4b59/tests/test-branches.t#l419>. "Correct close with commit and amend" duplicates tests at: <http://www.selenic.com/hg/file/12459bfa4b59/tests/test-commit-amend.t#l293> and <http://www.selenic.com/hg/file/12459bfa4b59/tests/test-commit-amend.t#l302>.

2. Add your test to an existing test in an already-created test repository whenever possible. Your test could easily squeeze into test-commit-amend.t near the lines I mentioned in (1).

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list