view contrib/dockerdeb @ 25018:93e015a3d1ea

commit: add ui.allowemptycommit config option This adds a config flag that enables a user to make empty commits. This is useful in a number of cases. For instance, automation that creates release branches via bookmarks may want to make empty commits to that release bookmark so that it can't be fast-forwarded and so it can record information about the release bookmark's creation. This is already possible with named branches, so making it possible for bookmarks makes sense. Another case we've wanted it is for mirroring repositories into Mercurial. We have automation that syncs commits into hg by running things from the command line. The ability to produce empty commits is useful for syncing unusual commits from other VCS's. In general, allowing the user to create the DAG as they see fit seems useful, and when I mentioned this in IRC more than one person piped up and said they were already hacking around this limitation by using mq, import, and commit-dummy-change-then-amend-the-content-away style solutions.
author Durham Goode <durham@fb.com>
date Mon, 11 May 2015 16:18:28 -0700
parents 4c4d0012db4f
children 05306b9359d3
line wrap: on
line source

#!/bin/bash -eu

. $(dirname $0)/dockerlib.sh
. $(dirname $0)/packagelib.sh

BUILDDIR=$(dirname $0)
export ROOTDIR=$(cd $BUILDDIR/..; pwd)

checkdocker

PLATFORM="debian-$1"
shift # extra params are passed to build process

initcontainer $PLATFORM

DEBBUILDDIR=$ROOTDIR/packages/$PLATFORM
contrib/builddeb --debbuilddir $DEBBUILDDIR/staged --prepare

DSHARED=/mnt/shared/
if [ $(uname) = "Darwin" ] ; then
    $DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \
            sh -c "cd /mnt/hg && make clean && make local"
fi
$DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \
  sh -c "cd /mnt/hg && make PREFIX=$DSHARED/staged/usr install"
$DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED $CONTAINER \
  dpkg-deb --build $DSHARED/staged
if [ $(uname) = "Darwin" ] ; then
    $DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \
            sh -c "cd /mnt/hg && make clean"
fi

gethgversion

rm -r $DEBBUILDDIR/staged
mv $DEBBUILDDIR/staged.deb $DEBBUILDDIR/mercurial-$version-$release.deb

echo
echo "Build complete - results can be found in $DEBBUILDDIR"