Ticket #277 (new defect)

Opened 7 months ago

Last modified 1 day ago

fix mercurial checkouts w/ revision

Reported by: bhearsum Assigned to: warner
Priority: major Milestone: 0.8.0
Component: other Version: 0.7.7
Keywords: Cc: warner, dustin, afri, even, bsmedberg, Pike, marcusl

Description

Mercurial checkouts that specify a revision *always* clobber. This is really terrible for large trees. By separating 'pull' and 'update' we can update to a certain revision without clobbering.

Through my own tests and asking around in #mercurial on Freenode I've confirmed that 'hg clone --rev [num]' and 'hg pull' && 'hg update --rev [num]' leave the working directory in the exact same state. (When doing a clone --rev you won't have any revisions later than the specified one in your repository, but I don't think we care about that.)

Patch incoming.

Attachments

fixMercurialUpdate.diff (1.7 kB) - added by bhearsum on 05/15/08 06:54:23.
fix mercurial checkouts with a revision
buildbot-hg-pull-command.patch (2.6 kB) - added by bsmedberg on 08/28/08 09:34:09.
patch for commands.py
buildbot-bug277.patch (3.3 kB) - added by bsmedberg on 09/22/08 13:29:46.
Updated patch

Change History

05/15/08 06:54:23 changed by bhearsum

  • attachment fixMercurialUpdate.diff added.

fix mercurial checkouts with a revision

05/15/08 06:55:28 changed by bhearsum

  • owner set to bhearsum.
  • status changed from new to assigned.

I was going to write a test for this but I'm pretty sure it gets tested as part of Mercurial.test_checkout. self.do_vctest() seems to do a lot of things, including adding revisions and checking out.

06/03/08 06:21:14 changed by bhearsum

Just wanted to note that we've been running this for the past few weeks without issue.

07/16/08 07:32:31 changed by bhearsum

  • cc set to warner, dustin.

Any chance this will make 0.7.8?

07/16/08 10:33:46 changed by warner

  • owner changed from bhearsum to warner.
  • status changed from assigned to new.

I'll look at it

07/20/08 05:51:44 changed by afri

  • cc changed from warner, dustin to warner, dustin, afri.

08/20/08 06:47:16 changed by dustin

warner, does this look OK? I don't have hg installed, and don't want to go down that particular rabbit hole, so I haven't committed it yet.

(in reply to: ↑ description ) 08/25/08 11:49:43 changed by even

  • cc changed from warner, dustin, afri to warner, dustin, afri, even.

08/28/08 08:00:09 changed by bsmedberg

I've tried this patch and have the following problem. If a pull occurs and there are no changes, the build fails, because the code in _handleEmptyUpdate is operating on the wrong command (the update command, instead of the pull command). I'm going to try and upload a patch in a bit.

08/28/08 08:00:18 changed by bsmedberg

  • cc changed from warner, dustin, afri, even to warner, dustin, afri, even, bsmedberg.

08/28/08 09:34:09 changed by bsmedberg

  • attachment buildbot-hg-pull-command.patch added.

patch for commands.py

08/28/08 09:36:47 changed by bsmedberg

The patch attached makes the following changes from the previous patch:

1) the ordering is doVCUpdate/_handleEmptyUpdate/_doUpdate 2) _doUpdate doesn't set self.command because AFAICT the only reason we set self.command was so _handleEmptyUpdate would have the correct command log to grep 3) when no revision is specified, explicitly specify 'default' to match the default behavior of a revision-less clone... if the previous checkout was on a branch, we want to revert to the default branch

08/30/08 13:17:31 changed by dustin

  • keywords set to review.

08/30/08 14:23:54 changed by dustin

  • keywords deleted.
  • milestone changed from undecided to 0.7.9.

The first of these patches (Ben's) applies, but the second (bsmedberg) doesn't.

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

bsmedberg, can you update it?

08/31/08 06:36:01 changed by Pike

  • cc changed from warner, dustin, afri, even, bsmedberg to warner, dustin, afri, even, bsmedberg, Pike.

09/01/08 04:17:03 changed by even

The bsmedberg's patch includes the Ben's patch so if you tried to apply them one after one, the second one logically fail. I tried to apply the bsmedberg's patch on a 0.7.8 base and it applied without problem.

09/22/08 13:29:46 changed by bsmedberg

  • attachment buildbot-bug277.patch added.

Updated patch

12/02/08 07:17:15 changed by marcusl

  • cc changed from warner, dustin, afri, even, bsmedberg, Pike to warner, dustin, afri, even, bsmedberg, Pike, marcusl.