Ticket #187 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

named branches in mercurial step are not supported

Reported by: dsallings Owned by:
Priority: major Milestone: undecided
Version: 0.7.6 Keywords: mercurial, review
Cc: dustin, afri, marcusl, dagvl, Pike

Description

Named branches are currently not supported in the Mercurial source step.

The attached patch models hgbuildbot's inrepo vs. dirname branches and allows the user to select the branching method.

Attachments

mercurial-named-branches-in-step.diff Download (3.9 KB) - added by dsallings 5 years ago.
allow named branches in mercurial step
mercurial_inrepo_test_187.diff Download (12.6 KB) - added by marcusl 4 years ago.
MercurialInrepoTest? + some random fixes on mercurial source step
mercurial_inrepotest_187.diff Download (7.8 KB) - added by marcusl 4 years ago.
MercurialInRepoTest? (new, test only)
mercurial_inrepo.diff Download (5.5 KB) - added by marcusl 4 years ago.
mercurial source step changes (new)

Change History

Changed 5 years ago by dsallings

allow named branches in mercurial step

comment:1 Changed 5 years ago by dsallings

  • component changed from other to vc-support

comment:2 Changed 5 years ago by dustin

  • Cc dustin added

Looks good. Want to add a test case and some documentation?

comment:3 Changed 5 years ago by warner

yay! I've love to commit this. But yeah, we need tests and docs. The test case should be in buildbot/test/test_vc.py, with a MercurialBranchInRepoHelper and MercurialBranchInRepo classes (as subclasses of their non-branchinrepo cousins). The MercurialBranchInRepo class needs to add these branchtype= arguments, and the helper needs to construct a repository that contains the extra branches in-repo instead of as separate repos.

thanks!

comment:4 Changed 5 years ago by afri

  • Cc afri added

comment:5 Changed 4 years ago by marcusl

  • Cc marcusl added

comment:6 Changed 4 years ago by dagvl

  • Cc dagvl added

comment:7 Changed 4 years ago by marcusl

I'm working on a test but I'm only halfway there yet. I've run into some problems with the auto-clobbering detection and I'm not really sure how to best tackle it.

I'll post a patch with my current progress, and see if anyone else could follow up.

Changed 4 years ago by marcusl

MercurialInrepoTest? + some random fixes on mercurial source step

comment:8 Changed 4 years ago by marcusl

I tried to add some manual code for detecting stale files and return an error (to trigger the clobber step), but that's likely not the right way to do it.

One should probably leave that out completely and test for branches instead?

Changed 4 years ago by marcusl

MercurialInRepoTest? (new, test only)

Changed 4 years ago by marcusl

mercurial source step changes (new)

comment:9 Changed 4 years ago by marcusl

These two last patches seem to make things run properly. Please ignore the 'mercurial_inrepo_test_187.diff' posted previosly.

(How does one remove attached files?)

It's 2.00 am so things might not be very pretty (especially as I fall back to a complete re-run of vcfull and vcupdate, not knowing how to do that except with some small wrapper functions), but at least all the tests (except tryPatch, see #400) complete successfully, for both Mercurial and MercurialInRepo?.

I've only tested this with hg 1.0.2, on Vista 64bit.

comment:10 Changed 4 years ago by marcusl

I'm planning on moving all patches to  http://github.com/marcusl/buildbot-187/tree/master to make the merge easier, but its w.i.p. at the moment.

comment:11 Changed 4 years ago by marcusl

  • Keywords mercurial, review added; mercurial removed

Ok. I've put the patches there. Marking for review.

comment:12 Changed 4 years ago by marcusl

Correction: There reference to #400 should be #398. (#400 still prevents the tryPatch tests to run successfully).

Sorry about the confiusion.

comment:13 Changed 4 years ago by marcusl

Re-did the clone and stored the fixes on a separate branch instead (per SubmittingPatches).

See  http://github.com/marcusl/buildbot/tree/bug187 instead.

comment:14 Changed 4 years ago by dustin

hmm, buildbot.test.test_vc.Mercurial.testCheckoutHTTP hangs for me. Any idea why?

comment:15 Changed 4 years ago by marcusl

Hmm. I did run it successfully before, but it has occasionally borked. (claiming a 'dirty' or 'unclean' reactor, which doesn't say much. Often, just re-running only the HTTP-test helped.)

Anyway, I'll double-check if there was something that didn't get through to the git-repo (I worked in a darcs-clone previously and I tried to clean things up a bit when doing the git-patch).

comment:16 follow-up: ↓ 17 Changed 4 years ago by marcusl

It doens't work here either, but if I enable deferred-debugging in test_vc.py the test passes.

#defer.Deferred.debug = True

That's what probably made it work before. Ideas?

comment:17 in reply to: ↑ 16 Changed 4 years ago by marcusl

Actually, it seems to work every other time, give or take, regardless of what I do.

comment:18 Changed 4 years ago by marcusl

I've added an extra deffered causing testCheckoutHTTP to wait until 'hg serve' has completed. This fixes the problem on my end.

This has been pushed to the bug187 branch on my git clone.

comment:19 Changed 4 years ago by Pike

  • Cc Pike added

comment:20 Changed 4 years ago by dustin

  • Status changed from new to closed
  • Resolution set to fixed

mreged -- thanks for hanging in there!

Note: See TracTickets for help on using tickets.