contrib/dockerrpm
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Sun, 11 May 2014 00:49:36 +0900
changeset 21421 4941caa9f0f8
parent 21255 62a2749895e4
child 21561 f1bcc33a5c52
permissions -rwxr-xr-x
mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qnew) This patch also replaces "editor = False" by "editor = cmdutil.getcommiteditor()", because: - the latter allows to hook commit message determination easily, even in the case without "--edit" - the latter can avoid regression (or additional care) around saving "last-message.txt", even if MQ's "newcommit()" changes its implementation logic from "localrepository.commit" to "localrepository.commitctx" with "memctx" in the future to save commit message into "last-messge.txt" with "memctx", "editor" should be valid function.

#!/bin/bash

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

if which docker >> /dev/null ; then
  DOCKER=docker
elif which docker.io >> /dev/null ; then
  DOCKER=docker.io
fi

$DOCKER build --tag "hg-dockerrpm-$1" - < $BUILDDIR/docker/$1
$DOCKER run --rm -v $ROOTDIR:/hg "hg-dockerrpm-$1" bash -c \
    "cp -a hg hg-build; cd hg-build; make clean local $1; cp build/$1/* /hg/build/$1/"