Ticket #181 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

hgbuildbot fails to signal merges properly causing incorrect builds

Reported by: dsallings Owned by: dustin
Priority: major Milestone: undecided
Version: 0.7.6 Keywords: mercurial
Cc: marcusl

Description

I'm not entirely sure whether the fault lies in PBChangeSource or hgbuildbot.py, but I've worked around it in the latter.

Basically, when a changeset comes in with no files, buildbot doesn't consider it and will build from a changeset that arrived before it. This is very undesirable.

To work around this, I've special-cased a no-file changeset to say it changed the file merge which at least makes it work in my environment.

I don't like this all that much, but it's a discussion point.

Attachments

hg-buildbot-merge.diff Download (815 bytes) - added by dsallings 4 years ago.
hgbuildbot.hg10.patch Download (2.4 KB) - added by marcusl 3 years ago.
Patch to make the inrepo-branch patch compile with hg 1.0
hgbuildbot.patch Download (2.5 KB) - added by paulegan 3 years ago.
Refactor and bug fixes for hgbuildbot.py

Change History

Changed 4 years ago by dsallings

comment:1 Changed 3 years ago by paulegan

  • Owner set to dustin

I've been using a similar patch to address this issue. It seems that the git change source has the same problem (and suggested fix): #249. I've attached a patch which includes a fix for this issue (and #328) as well as refactoring the code to make it a little more clear.

comment:2 Changed 3 years ago by marcusl

  • Cc marcusl added

Changed 3 years ago by marcusl

Patch to make the inrepo-branch patch compile with hg 1.0

comment:3 Changed 3 years ago by marcusl

I've added a updated patch that works with the new api in mercurial 1.0.2. (workingctx is not a member function of localrepo anymore + len(foo) replaces foo.count() in some occasions)

I hope you're able to make sense of this.

comment:4 follow-up: ↓ 5 Changed 3 years ago by paulegan

I've been using a similarly updated patch since upgrading. It should be noted that the new api applies to Mercurial 1.1, and not 1.0.2. Both old & new apis can be supported with a try/except fall-back.

PS: in 1.1 you can also get workingctx with repo[None].

Changed 3 years ago by paulegan

Refactor and bug fixes for hgbuildbot.py

comment:5 in reply to: ↑ 4 Changed 3 years ago by marcusl

Replying to paulegan:

I've been using a similarly updated patch since upgrading. It should be noted that the new api applies to Mercurial 1.1, and not 1.0.2. Both old & new apis can be supported with a try/except fall-back.

Ok. Sorry about that. I thought I had updated to the 1.0.2 tag in my hg-stable checkout.

PS: in 1.1 you can also get workingctx with repo[None].

I noticed that. It felt a bit clearer the way I did it though. No matter.

comment:6 Changed 3 years ago by dustin

This is at:

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

marcusl, do you want to do more with this patch?

comment:7 Changed 3 years ago by dustin

(btw, tests are passing for me)

comment:8 Changed 3 years ago by marcusl

I think it's as good as it gets. It does put the branch name in the changes, so it should be ok.

Note that we don't have a hg-inrepo test (see #187) yet.

comment:9 Changed 3 years ago by dustin

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

ok, it's in :)

Note: See TracTickets for help on using tickets.