On 11 apr 2014, at 17:19, Jonathan Gibbons <jonathan.gibb...@oracle.com> wrote:
> Is it common to use mq in all repos of a forest? For me it is very common to be working on a fix that spans multiple repos (up to 5 different repos at times). So, yes. I like this fix, but I would be very annoyed if all my patches were applied (not just those that were applied before get_source.sh ran). I frequently have lots of patches in the queue that I don’t want to have applied. Thanks, /Staffan > > I've never used mq that way; it would only have occurred to me to use mq in > the repo I'm interested in -- in my case, langtools. But then, I admit I tend > not to clone forests more than necessary. configure.sh > --with-override-repo-name is your friend ;-) > > -- Jon > > > On 04/11/2014 08:19 AM, Chris Hegarty wrote: >> On 11/04/14 15:59, Michael McMahon wrote: >>> That's very useful Chris. I wonder is it okay to assume that all patches >>> must be pushed back again after the update? >>> >>> Would it be feasible to remember which (if any) patches had been popped >>> first, and only push the same ones again? >> >> That would require a much more involved set of changes in hgforest, but >> could be doable. All you need to know is queue tip, 'hg qtop', of each repo, >> qpush back to it. >> >> -Chris. >> >>> >>> Michael >>> >>> On 11/04/14 15:58, 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. >>> >