contrib/dockerrpm
author Gregory Szorc <gregory.szorc@gmail.com>
Thu, 24 Jul 2014 12:12:12 -0700
branchstable
changeset 21939 f486001f9d6f
parent 21642 76a347bcdb33
child 22438 f5abb231b80a
permissions -rwxr-xr-x
revset: optimize baseset.__sub__ (issue4313) dd716807fd23 regressed performance of baseset.__sub__ by introducing a lazyset. This patch restores that lost performance by eagerly evaluating baseset.__sub__ if the other set is a baseset. revsetbenchmark.py results impacted by this change: revset #6: roots(0::tip) 0) wall 2.923473 comb 2.920000 user 2.920000 sys 0.000000 (best of 4) 1) wall 0.077614 comb 0.080000 user 0.080000 sys 0.000000 (best of 100) revset #23: roots((0:tip)::) 0) wall 2.875178 comb 2.880000 user 2.880000 sys 0.000000 (best of 4) 1) wall 0.154519 comb 0.150000 user 0.150000 sys 0.000000 (best of 61) On the author's machine, this slowdown manifested during evaluation of 'roots(%ln::)' in phases.retractboundary after unbundling the Firefox repository. Using `time hg unbundle firefox.hg` as a benchmark: Before: 8:00 After: 4:28 Delta: -3:32 For reference, the subset and cs baseset instances impacted by this change were of lengths 193634 and 193627, respectively. Explicit test coverage of roots(%ln::), while similar to the existing roots(0::tip) benchmark, has been added.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21255
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     1
#!/bin/bash
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     2
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     3
BUILDDIR=$(dirname $0)
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     4
ROOTDIR=$(cd $BUILDDIR/..; pwd)
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     5
21642
76a347bcdb33 docker: check for docker.io first
Matt Mackall <mpm@selenic.com>
parents: 21561
diff changeset
     6
if which docker.io >> /dev/null ; then
76a347bcdb33 docker: check for docker.io first
Matt Mackall <mpm@selenic.com>
parents: 21561
diff changeset
     7
  DOCKER=docker.io
76a347bcdb33 docker: check for docker.io first
Matt Mackall <mpm@selenic.com>
parents: 21561
diff changeset
     8
elif which docker >> /dev/null ; then
21255
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     9
  DOCKER=docker
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    10
fi
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    11
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    12
$DOCKER build --tag "hg-dockerrpm-$1" - < $BUILDDIR/docker/$1
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    13
$DOCKER run --rm -v $ROOTDIR:/hg "hg-dockerrpm-$1" bash -c \
21561
f1bcc33a5c52 docker: update package target to packages/
Matt Mackall <mpm@selenic.com>
parents: 21255
diff changeset
    14
    "cp -a hg hg-build; cd hg-build; make clean local $1; cp packages/$1/* /hg/packages/$1/"