Re: RFR [9] : get_source.sh should be more friendly to MQ
John, Mike, Thanks for your comments. I’ve been using rebase for a while now and it certainly makes resolving conflicts in patches much easier, as opposed to manually inspecting reject files. My workflow is as per your suggestion, bash common/bin/hgforest.sh push -a bash common/bin/hgforest.sh pull —rebase Give that not everyone wants to operate this way, using rebase, I’m not sure what, if anything, can be added to get_source.sh to support this. Maybe I just need to omit get_source.sh from my workflow after the initial clone? -Chris. On 28 Apr 2014, at 20:43, John Coomes john.coo...@oracle.com wrote: Chris Hegarty (chris.hega...@oracle.com) wrote: On 11/04/14 15:59, Jonathan Gibbons wrote: 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. Michael as requested same. What is the behavior if you cannot qpush patches after the pull, because of merge issues? The parts of the specific patch that applied cleanly remain applied, them that did not are written out to reject files to be analyzed. The remainder of the patches in that repository are not applied. get_source will then exit with an appropriate error exit code and you can take action. [Sorry for resurrecting this thread, I just became aware of it--was not subscribed.] My workflow relies heavily on mq and (IMHO, of course) reject files are needless tedium. So I depend heavily on rebase. In order to avoid reject files when pulling, I do: hg qpush -a # push everything hg pull --rebase# pull and rebase in one step, will # invoke merge tools if necessary hg qpop some_patch# optional If you omit the 'hg qpush -a' before pulling, it becomes tedious (sometimes impossible) to get your merge tools invoked when you later want to push the patches. -John 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. -- John CoomesOracle, MS USCA22-3?? john.coo...@oracle.com 4220 Network Circle 408-276-7048 Santa Clara, CA 95054-1778 *** Support GreenPeace and we'll all breathe easier. ***
Re: RFR [9] : get_source.sh should be more friendly to MQ
Chris Hegarty (chris.hega...@oracle.com) wrote: On 11/04/14 15:59, Jonathan Gibbons wrote: 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. Michael as requested same. What is the behavior if you cannot qpush patches after the pull, because of merge issues? The parts of the specific patch that applied cleanly remain applied, them that did not are written out to reject files to be analyzed. The remainder of the patches in that repository are not applied. get_source will then exit with an appropriate error exit code and you can take action. [Sorry for resurrecting this thread, I just became aware of it--was not subscribed.] My workflow relies heavily on mq and (IMHO, of course) reject files are needless tedium. So I depend heavily on rebase. In order to avoid reject files when pulling, I do: hg qpush -a # push everything hg pull --rebase# pull and rebase in one step, will # invoke merge tools if necessary hg qpop some_patch# optional If you omit the 'hg qpush -a' before pulling, it becomes tedious (sometimes impossible) to get your merge tools invoked when you later want to push the patches. -John 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. -- John CoomesOracle, MS USCA22-3?? john.coo...@oracle.com 4220 Network Circle 408-276-7048 Santa Clara, CA 95054-1778 *** Support GreenPeace and we'll all breathe easier. ***
Re: RFR [9] : get_source.sh should be more friendly to MQ
Mike Duigou (mike.dui...@oracle.com) wrote: On Apr 11 2014, at 12:06 , Chris Hegarty chris.hega...@oracle.com wrote: On 11 Apr 2014, at 18:55, Mike Duigou mike.dui...@oracle.com wrote: Have you looked at using rebase? I have not, in any detail. I've been using sh common/bin/hgforest.sh pull sh common/bin/hgforest.sh rebase sh common/bin/hgforest.sh update rather than get_source.sh as it allows me to skip the qpop/qpush steps. Yes, this may work. I was just looking for a single command to active this. Maybe this combination could be baked into get_source.sh if patch repositories exist, and we can verify the existence of the rebase extension ( rather than my previous proposal ) ? I have contemplated adding this as an alternative to the pull -u step in get_source.sh but wasn't others would agree. Some people hate rebase. We can detect whether rebase is enabled via : hg showconfig extensions | grep ^extension.rebase | wc -l Play with this approach manually and see if it works for you. If it does then we can consider enhancing get_source.sh 'hg pull --rebase' is the equivalent of pull + update + rebase, and you should already be able to run 'hgforest.sh pull --rebase' (although I haven't tried it). I'd be wary of trying to run rebase automatically, without an indication that's what the user wants. -John -Chris. Mike On Apr 11 2014, at 07:58 , Chris Hegarty chris.hega...@oracle.com 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. -- John CoomesOracle, MS USCA22-3?? john.coo...@oracle.com 4220 Network Circle 408-276-7048 Santa Clara, CA 95054-1778 *** Support GreenPeace and we'll all breathe easier. ***
Re: RFR [9] : get_source.sh should be more friendly to MQ
Jonathan Gibbons (jonathan.gibb...@oracle.com) wrote: Could we do the same with the trees extension? You can do it now with: hg tpull --rebase (As mentioned in my other message, I always precede the above with 'hg qpush -a' to avoid reject files.) -John On 04/11/2014 10:55 AM, Mike Duigou wrote: Have you looked at using rebase? I've been using sh common/bin/hgforest.sh pull sh common/bin/hgforest.sh rebase sh common/bin/hgforest.sh update rather than get_source.sh as it allows me to skip the qpop/qpush steps. Mike On Apr 11 2014, at 07:58 , Chris Hegarty chris.hega...@oracle.com 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. -- John CoomesOracle, MS USCA22-3?? john.coo...@oracle.com 4220 Network Circle 408-276-7048 Santa Clara, CA 95054-1778 *** Support GreenPeace and we'll all breathe easier. ***
Re: RFR [9] : get_source.sh should be more friendly to MQ
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? 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.
Re: RFR [9] : get_source.sh should be more friendly to MQ
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.
Re: RFR [9] : get_source.sh should be more friendly to MQ
On 11/04/14 15:59, Jonathan Gibbons wrote: 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. Michael as requested same. What is the behavior if you cannot qpush patches after the pull, because of merge issues? The parts of the specific patch that applied cleanly remain applied, them that did not are written out to reject files to be analyzed. The remainder of the patches in that repository are not applied. get_source will then exit with an appropriate error exit code and you can take action. -Chris. -- 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.
Re: RFR [9] : get_source.sh should be more friendly to MQ
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.
Re: RFR [9] : get_source.sh should be more friendly to MQ
Is it common to use mq in all repos of a forest? 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.
Re: RFR [9] : get_source.sh should be more friendly to MQ
On 11/04/14 16:19, 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. or something like: list=`hg qapplied` hg qpop -a before doing the update and then afterwards hg qpush `echo $list` -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.
Re: RFR [9] : get_source.sh should be more friendly to MQ
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.
Re: RFR [9] : get_source.sh should be more friendly to MQ
Have you looked at using rebase? I've been using sh common/bin/hgforest.sh pull sh common/bin/hgforest.sh rebase sh common/bin/hgforest.sh update rather than get_source.sh as it allows me to skip the qpop/qpush steps. Mike On Apr 11 2014, at 07:58 , Chris Hegarty chris.hega...@oracle.com 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.
Re: RFR [9] : get_source.sh should be more friendly to MQ
Could we do the same with the trees extension? -- Jon On 04/11/2014 10:55 AM, Mike Duigou wrote: Have you looked at using rebase? I've been using sh common/bin/hgforest.sh pull sh common/bin/hgforest.sh rebase sh common/bin/hgforest.sh update rather than get_source.sh as it allows me to skip the qpop/qpush steps. Mike On Apr 11 2014, at 07:58 , Chris Hegarty chris.hega...@oracle.com 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.
Re: RFR [9] : get_source.sh should be more friendly to MQ
On 11 Apr 2014, at 18:55, Mike Duigou mike.dui...@oracle.com wrote: Have you looked at using rebase? I have not, in any detail. I've been using sh common/bin/hgforest.sh pull sh common/bin/hgforest.sh rebase sh common/bin/hgforest.sh update rather than get_source.sh as it allows me to skip the qpop/qpush steps. Yes, this may work. I was just looking for a single command to active this. Maybe this combination could be baked into get_source.sh if patch repositories exist, and we can verify the existence of the rebase extension ( rather than my previous proposal ) ? -Chris. Mike On Apr 11 2014, at 07:58 , Chris Hegarty chris.hega...@oracle.com 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.
Re: RFR [9] : get_source.sh should be more friendly to MQ
On Apr 11 2014, at 12:06 , Chris Hegarty chris.hega...@oracle.com wrote: On 11 Apr 2014, at 18:55, Mike Duigou mike.dui...@oracle.com wrote: Have you looked at using rebase? I have not, in any detail. I've been using sh common/bin/hgforest.sh pull sh common/bin/hgforest.sh rebase sh common/bin/hgforest.sh update rather than get_source.sh as it allows me to skip the qpop/qpush steps. Yes, this may work. I was just looking for a single command to active this. Maybe this combination could be baked into get_source.sh if patch repositories exist, and we can verify the existence of the rebase extension ( rather than my previous proposal ) ? I have contemplated adding this as an alternative to the pull -u step in get_source.sh but wasn't others would agree. Some people hate rebase. We can detect whether rebase is enabled via : hg showconfig extensions | grep ^extension.rebase | wc -l Play with this approach manually and see if it works for you. If it does then we can consider enhancing get_source.sh Mike -Chris. Mike On Apr 11 2014, at 07:58 , Chris Hegarty chris.hega...@oracle.com 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.