Message ID | yddr54bt6t9.fsf@manam.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
On 08/24/2011 12:58 PM, Rainer Orth wrote: > With both ways, the output of hg log --debug looks like this: > > extra: branch=gcc-4_6-branch > extra: convert_revision=svn:138bc75d-0d04-0410-961f-82ee72b054a4/branches/gcc-4_6-branch@177861 > > extra: branch=default > extra: convert_revision=svn:138bc75d-0d04-0410-961f-82ee72b054a4/trunk@177984 > > I'm now ignoring hg branch and extract both branch and svn revision from > this. The patch below has been tested by running gcc_update on both > trunk and 4.6 branch checkouts. Not sure anyone else is using hg for gcc_update, so I'll assume you know what you're doing. Give people 24-48 hours to complain, though it's unlikely anybody would. :) Paolo
# HG changeset patch # Parent 0e159d056c346e038491cc1d9aa2adaa8f7411ea Don't assume hg convert in gcc_update diff --git a/contrib/gcc_update b/contrib/gcc_update --- a/contrib/gcc_update +++ b/contrib/gcc_update @@ -340,14 +340,13 @@ case $vcs_type in # corresponding to the extra: tag, so need to use hg log --debug # to extract the info. parents=`$GCC_HG parents --template '{rev}'` - revision=`$GCC_HG log --debug -r$parents | \ + convert_revision=`$GCC_HG log --debug -r$parents | \ sed -ne "/^extra:.*convert_revision=svn:/ { - s%^.*@%% + s%^[^/]*/%% p }"` - branch=`$GCC_HG branch` - # trunk in SVN parlance shows up as default branch in hg. - [ x$branch = x"default" ] && branch="trunk" + revision=`echo $convert_revision | sed -e 's/.*@//'` + branch=`echo $convert_revision | sed -e 's%branches/%%' -e 's/@.*//'` ;; svn)