Ticket #180 (new enhancement)

Opened 3 years ago

Last modified 3 months ago

buildbot try does the wrong thing with mercurial queues

Reported by: dsallings Owned by: dsallings
Priority: major Milestone: 0.8.+
Version: 0.7.6 Keywords: hg
Cc: afri, dustin, dsallings, marcusl

Description

We'd like to be able to use buildbot try and mercurial queues. It's a pretty simple change to make:

Instead of asking for the tree identity, ask for the identity of the qparent. If there's not a qparent, ask for the current identity (as is done now). Then always diff against the discovered patch level.

A patch is attached that seems to do the job well.

Attachments

try-mq.diff Download (0.8 KB) - added by dsallings 3 years ago.
try with mq support
180-testcase.diff Download (3.2 KB) - added by Ben 2 years ago.
draft of testcase
test.log Download (2.9 KB) - added by dustin 21 months ago.
did-not-see-expected-test.log

Change History

Changed 3 years ago by dsallings

try with mq support

Changed 2 years ago by afri

  • cc afri added

Changed 2 years ago by Ben

  • cc dustin added

Seems reasonable to me, any objections to that one ?

For the non Mercurial aware, this patch means that if you have any pending patch (as opposed to normal changeset) on your repository, the diff is done with those actual pending patches. If not, revert back to the current modif on the working dir.

Changed 2 years ago by dustin

  • status changed from new to closed
  • resolution set to fixed

 http://repo.or.cz/w/buildbot.git?a=shortlog;h=refs/remotes/dustin/bug180

(note: I have no way to test this, as I don't use hg -- I'm going on Ben's "seems reasonable")

Changed 2 years ago by Ben

  • status changed from closed to reopened
  • resolution fixed deleted

Note that a test case would be nice ...

I'll try to combine one tonight.

Changed 2 years ago by Ben

  • owner set to dsallings
  • status changed from reopened to new

I cannot make my testsuite working ...

So I leave the ticket open, untill *someone* fix the testsuite or the patch ....

Here is where I am so far (see patch actually)

Changed 2 years ago by Ben

draft of testcase

Changed 2 years ago by Ben

  • type changed from defect to enhancement

to finish for today, it's more a wish than a defect ...

Changed 2 years ago by dustin

  • keywords review added; mercurial try removed

Changed 2 years ago by dustin

  • cc dsallings added
  • keywords review removed

OK, this patch is available in integrated form at:

 http://repo.or.cz/w/buildbot.git?a=shortlog;h=refs/remotes/dustin/bug180

Since this is a "draft", I haven't pulled it into the dev tree yet, and will un-mark it for review.

===============================================================================
[ERROR]: buildbot.test.test_vc.Mercurial.testTryMq

Traceback (most recent call last):
  File "/home/dustin/devel/projects/buildbot/t/buildbot/buildbot/test/test_vc.py", line 345, in check
    + ": see logs for stdout")
exceptions.RuntimeError: command ['/usr/bin/hg', 'qnew', '-f', 'patch.diff'] finished with exit code 255: see logs for stdout

By the way, dsallings, what is your full name and email address, so I can give you credit?

Changed 2 years ago by dsallings

Great, thanks. Dustin Sallings <dustin@…>

Changed 2 years ago by dsallings

I just realized this was showing an error. I haven't used hg with buildbot in a while, but I was using it with this recipe. Is it actually failing? If so, does the log show anything?

Changed 21 months ago by dustin

looks like 'qnew' is too new for my version of hg?

[I] dev-util/mercurial
     Available versions:  1.0.1-r2 ~1.0.1-r3 1.0.2 {bash-completion bugzilla cvs darcs emacs git gpg subversion test zsh-completion}
     Installed versions:  1.0.2(02:02:29 12/03/08)(-bash-completion -bugzilla -emacs -gpg -test -zsh-completion)
     Homepage:            http://www.selenic.com/mercurial/
     Description:         Scalable distributed SCM

Changed 21 months ago by dsallings

You have to enable mq before the commands work:

~/.hgrc:

[extensions] hgext.mq =

Changed 21 months ago by dsallings

Sorry, poorly formatted.

[extensions]
hgext.mq=

Changed 21 months ago by dustin

Hmm, I don't really know what that means, but is there some way to detect that and either skip the tests or give a helpful failure message in that case? That might deserve another bug.

For now, I see this, which I don't really know how to diagnose.

===============================================================================
[FAIL]: buildbot.test.test_vc.Mercurial.testTryMq

Traceback (most recent call last):
  File "/home/dustin/devel/projects/buildbot/t/buildbot/buildbot/test/test_vc.py", line 964, in _do_getpatch_trunkhead_2
    self.failUnlessIn("try",ss.patch[1])
  File "/home/dustin/devel/projects/buildbot/t/buildbot/buildbot/test/test_vc.py", line 382, in failUnlessIn
    self.failUnless(string.find(substring) != -1, msg)
twisted.trial.unittest.FailTest: did not see the expected substring 'try' in string ''
-------------------------------------------------------------------------------
Ran 1 tests in 4.782s

By the way, I have cloned the buildbot repo at  http://github.com/djmitche/buildbot. If you want to meet me in #buildbot (freenode), maybe we can figure out a way to make this patch process easier.

Changed 21 months ago by dsallings

hg help | grep qnew

Changed 21 months ago by dustin

OK, I added a fix to detect the mq extension and skip if it's not present, at

 http://github.com/djmitche/buildbot/tree/bug180

However, with the proper .hgrc, this is still failing..

Changed 21 months ago by dustin

hmm, this may be due to an earlier commit. Running 'git bisect' now.

Changed 21 months ago by dsallings

This is just under a year old. I pretty much don't use hg anymore for anything, but the functionality was very useful when I was.

That is to say, I don't know how useful I'll be in getting it up-to-date, as I don't use it anymore, and last time I tried updating local git changes over cvs, there were too many conflicts.

It might be good to reach out to more hg users and see if anyone can at least tell if it still works.

Changed 21 months ago by dustin

did-not-see-expected-test.log

Changed 21 months ago by dustin

gotcha, thanks.

Changed 21 months ago by marcusl

  • cc marcusl added

Changed 20 months ago by marcusl

Is it skipping the entire Mercurial tests or just the mq-part? It looks like it's the entire shebang, which is a bit worrying, no?

Also, how about using the repository's hgrc file ( i.e .hg/hgrc) to just enable the extension for our test repo?

Just my 0.02$.

Changed 19 months ago by dustin

  • milestone changed from undecided to 0.7.+

This is still failing for me; I just rebased it onto master.

 http://github.com/djmitche/buildbot/tree/bug180

Changed 18 months ago by marcusl

I've merged with current master and made a small mod that only skips the tryMqTest. It fails here too, but at least the failure is more localized and more test work without mq-enabled.

 http://github.com/marcusl/buildbot/tree/bug180

Changed 16 months ago by dustin

I've got your most recent changes merged in my bug180, but it's still failing. Just FYI :)

Changed 9 months ago by dustin

  • milestone changed from 0.8.+ to 0.7.12

What's going on here? I pulled marcusl's bug180 branch. I have

[extensions]
hgext.mq=

in my .hgrc, and

dustin@euclid ~/code/buildbot/t/buildbot [bug180] $ hg showconfig | grep hgext
extensions.hgext.mq=

yet

[SKIPPED]: buildbot.test.test_vc.MercurialInRepo.testCheckout

Add 'hgext.mq =' to the '[extensions]' section of ~/.hgrc

We should really either get this merged or give up..

Changed 8 months ago by marcusl

Haven't worked on for.. well.. 8 months.

I'm not using mq either, so I've never gotten around to scratch this itch properly.

Changed 8 months ago by dustin

  • milestone changed from 0.7.12 to 0.8.0

next release, then :)

Changed 6 months ago by dustin

  • milestone changed from 0.8.0 to 0.8.+

bump..

Changed 3 months ago by dustin

  • keywords hg added
Note: See TracTickets for help on using tickets.