##// END OF EJS Templates
fix: add a -s option to format a revision and its descendants...
fix: add a -s option to format a revision and its descendants `hg fix -r abc123` will format that commit but not its descendants. That seems expected given the option name (`-r`), but it's very rarely what the user wants to do. The problem is that any descendants of that commit will not be formatted, leaving them as orphans that are hard to evolve. They are hard to evolve because the new parent will have formatting changes that the orphan doesn't have. I talked to Danny Hooper (who wrote most of the fix extension) about the problem and we agreed that deprecating `-r` in favor of a new `-s` argument (mimicing rebase's `-s`) would be a good way of reducing the risk that users end up with these hard-to-evolve orphans. So that's what this patch implements. Differential Revision: https://phab.mercurial-scm.org/D8287

File last commit:

r43676:e66a3bfc stable
r45064:5205b46b default
Show More
dockerrpm
60 lines | 1.5 KiB | text/plain | TextLexer
#!/bin/bash -e
BUILDDIR=$(dirname $0)
export ROOTDIR=$(cd $BUILDDIR/../..; pwd)
PLATFORM="$1"
shift # extra params are passed to buildrpm
DOCKERFILE="$PLATFORM"
OS_RELEASE="${PLATFORM//[a-z]/}"
case "$PLATFORM" in
fedora*)
DOCKERFILE="${PLATFORM//[0-9]/}.template"
;;
esac
DOCKER=$($BUILDDIR/hg-docker docker-path)
CONTAINER=hg-docker-$PLATFORM
if [[ -z "${HG_DOCKER_OWN_USER}" ]]; then
DOCKERUID=1000
DOCKERGID=1000
else
DOCKERUID=$(id -u)
DOCKERGID=$(id -g)
fi
$BUILDDIR/hg-docker build \
--build-arg UID=$DOCKERUID \
--build-arg GID=$DOCKERGID \
--build-arg OS_RELEASE=${OS_RELEASE:-latest} \
$BUILDDIR/docker/$DOCKERFILE $CONTAINER
RPMBUILDDIR=$ROOTDIR/packages/$PLATFORM
mkdir -p $RPMBUILDDIR
$ROOTDIR/contrib/packaging/buildrpm --rpmbuilddir $RPMBUILDDIR --prepare $*
DSHARED=/mnt/shared
DBUILDUSER=build
$DOCKER run -e http_proxy -e https_proxy -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \
rpmbuild --define "_topdir $DSHARED" -ba $DSHARED/SPECS/mercurial.spec --clean
$DOCKER run -e http_proxy -e https_proxy -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]
name=Mercurial packages for $PLATFORM
# baseurl=file://$RPMBUILDDIR/
baseurl=http://hg.example.com/build/$PLATFORM/
skip_if_unavailable=True
gpgcheck=0
enabled=1
EOF
echo
echo "Build complete - results can be found in $RPMBUILDDIR"