##// END OF EJS Templates
rebase: move actual rebase into a single transaction...
rebase: move actual rebase into a single transaction Previously, rebasing would open several transaction over the course of rebasing several commits. Opening a transaction can have notable overhead (like copying the dirstate) which can add up when rebasing many commits. This patch adds a single large transaction around the actual commit rebase operation, with a catch for intervention which serializes the current state if we need to drop back to the terminal for user intervention. Amazingly, almost all the tests seem to pass. On large repos with large working copies, this can speed up rebasing 7 commits by 25%. I'd expect the percentage to be a bit larger for rebasing even more commits. There are minor test changes because we're rolling back the entire transaction during unexpected exceptions instead of just stopping mid-rebase, so there's no more backup bundle. It also leave an unknown file in the working copy, since our clean up 'hg update' doesn't delete unknown files.

File last commit:

r27788:d713fa93 default
r31226:cf8ad0e6 default
Show More
dockerrpm
37 lines | 912 B | text/plain | TextLexer
Mads Kiilerich
dockerrpm: check that docker is running correctly before building
r22438 #!/bin/bash -e
Matt Mackall
build: initial support for in-tree autobuilding recipes
r21255
Augie Fackler
dockerlib: start extracting common functions for setting up docker...
r24968 . $(dirname $0)/dockerlib.sh
Matt Mackall
build: initial support for in-tree autobuilding recipes
r21255 BUILDDIR=$(dirname $0)
Augie Fackler
dockerlib: extract initcontainer() method...
r24969 export ROOTDIR=$(cd $BUILDDIR/..; pwd)
Matt Mackall
build: initial support for in-tree autobuilding recipes
r21255
Augie Fackler
dockerlib: start extracting common functions for setting up docker...
r24968 checkdocker
Mads Kiilerich
dockerrpm: check that docker is running correctly before building
r22438
Mads Kiilerich
dockerrpm: better handling of specification of docker name
r22439 PLATFORM="$1"
Mads Kiilerich
docker: add CentOS 5...
r22443 shift # extra params are passed to buildrpm
Mads Kiilerich
dockerrpm: better handling of specification of docker name
r22439
Augie Fackler
dockerlib: extract initcontainer() method...
r24969 initcontainer $PLATFORM
Mads Kiilerich
dockerrpm: run docker build process as the current user, not as root...
r22440
Mads Kiilerich
dockerrpm: prepare source outside docker and just run rpmbuild inside docker...
r22441 RPMBUILDDIR=$ROOTDIR/packages/$PLATFORM
Mads Kiilerich
docker: add CentOS 5...
r22443 contrib/buildrpm --rpmbuilddir $RPMBUILDDIR --prepare $*
Mads Kiilerich
dockerrpm: prepare source outside docker and just run rpmbuild inside docker...
r22441
DSHARED=/mnt/shared
$DOCKER run -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \
rpmbuild --define "_topdir $DSHARED" -ba $DSHARED/SPECS/mercurial.spec --clean
Mads Kiilerich
dockerrpm: create a yum/dnf repo from the generated rpms...
r22444
$DOCKER run -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \
createrepo $DSHARED
cat << EOF > $RPMBUILDDIR/mercurial.repo
# Place this file in /etc/yum.repos.d/mercurial.repo
[mercurial]
Mads Kiilerich
buildrpm: fix use of invalid $PLATFORM in mercurial.repo
r23124 name=Mercurial packages for $PLATFORM
Mads Kiilerich
dockerrpm: create a yum/dnf repo from the generated rpms...
r22444 # baseurl=file://$RPMBUILDDIR/
Mads Kiilerich
buildrpm: fix use of invalid $PLATFORM in mercurial.repo
r23124 baseurl=http://hg.example.com/build/$PLATFORM/
Mads Kiilerich
dockerrpm: create a yum/dnf repo from the generated rpms...
r22444 skip_if_unavailable=True
gpgcheck=0
enabled=1
EOF
echo
echo "Build complete - results can be found in $RPMBUILDDIR"