##// END OF EJS Templates
rebase: allow aborting if last-message.txt is missing...
rebase: allow aborting if last-message.txt is missing Previously, if .hg/rebasestate existed but .hg/last-message.txt was missing, 'hg rebase --abort' would say there's no rebase in progress but 'hg checkout foo' would say 'abort: rebase in progress'. It turns out loading the collapse message will throw a "no rebase in progress" error if the file doesn't exist, even though .hg/rebasestate obviously indicates a rebase is in progress. The fix is to only throw an exception if we're trying to --continue, and to just eat the issues if we're doing --abort. This issue is exposed by us writing the rebase state earlier in the process. This will be used by later patches to ensure the user can appropriately 'hg rebase --abort' if there's a crash before the first the first commit has finished rebasing. Tests cover all of this. The only negative affect is we now require a hg rebase --abort in a very specific exception case, as shown in the test.

File last commit:

r27788:d713fa93 default
r31225:749b057b 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"