RFR [9] : get_source.sh should be more friendly to MQ
Jonathan Gibbons
jonathan.gibbons at oracle.com
Fri Apr 11 14:59:21 UTC 2014
Popping all patches beforehand is reasonable, but afterwards, it would
be better to reset to the patches that were previously applied than to
try and push all of them.
What is the behavior if you cannot qpush patches after the pull, because
of merge issues?
-- Jon
On 04/11/2014 07:58 AM, Chris Hegarty wrote:
> Anyone using MQ for their daily development will know about this,
> forgetting to qpop before sync'ing up. It would be nice it get_source
> would pop and push patches ( only if you are using MQ ) automatically.
> If you do not have patch repos, then there is no change.
>
> diff --git a/get_source.sh b/get_source.sh
> --- a/get_source.sh
> +++ b/get_source.sh
> @@ -28,6 +28,21 @@
> # Get clones of all nested repositories
> sh ./common/bin/hgforest.sh clone "$@" || exit 1
>
> +patchdirs=`ls -d ./.hg/patches ./*/.hg/patches ./*/*/.hg/patches \
> + ./*/*/*/.hg/patches ./*/*/*/*/.hg/patches 2>/dev/null`
> +
> +# Pop all patches, if any, before updating
> +if [ "${patchdirs}" != "" ] ; then
> + echo "Found queue repository, qpop."
> + sh ./common/bin/hgforest.sh qpop -a || exit 1
> +fi
> +
> # Update all existing repositories to the latest sources
> -sh ./common/bin/hgforest.sh pull -u
> +sh ./common/bin/hgforest.sh pull -u || exit 1
>
> +# Push all patches, if any, after updating
> +if [ "${patchdirs}" != "" ] ; then
> + echo "Found queue repository, qpush."
> + sh ./common/bin/hgforest.sh qpush -a
> +fi
> +
>
> -Chris.
More information about the build-dev
mailing list