webrev -f not working?
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Wed Nov 5 13:57:13 UTC 2014
On 2014-11-05 14:43, Daniel Fuchs wrote:
> Hi Magnus,
>
> I'm curious - on which OS are you running?
Ubuntu.
magnusi at sthihse3:~$ uname -a
Linux sthihse3 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC
2014 x86_64 x86_64 x86_64 GNU/Linux
magnusi at sthihse3:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
magnusi at sthihse3:~$
> The line in question was modified by me when I changed webrev to
> use trees instead of forest - and I'm regularly using
> webrev -fN on Mac.
Does the output from hg tstat look the same to you? I.e., like this:
[/localhome/hg/jdk9-dev-ALT]:
M common/autoconf/basics.m4
[/localhome/hg/jdk9-dev-ALT/jaxws]:
[/localhome/hg/jdk9-dev-ALT/jdk]:
M make/gensrc/GensrcIcons.gmk
When reading the code, I can't really understand why the old code could
ever have worked on a output like that.
/Magnus
>
> best regards,
>
> -- daniel
>
> On 05/11/14 13:49, Magnus Ihse Bursie wrote:
>> I tried using webrev -N -f with open changes in the top repo and in the
>> jdk repo, and it didn't work. The path to the jdk repo got mangled, and
>> I got errors like this:
>>
>> *** Error: file not in parent or child
>> abort: cannot follow file not in parent revision:
>> "jd/make/gensrc/GensrcIcons.gmk"
>> jd/make/gensrc/GensrcIcons.gmk
>>
>> The keen eye notes "jd/" instead of "jdk/". It seems that the output
>> from "hg tstatus" which is like:
>> [/localhome/hg/jdk9-dev-ALT]:
>> M common/autoconf/basics.m4
>>
>> [/localhome/hg/jdk9-dev-ALT/jaxws]:
>>
>> [/localhome/hg/jdk9-dev-ALT/jdk]:
>> M make/gensrc/GensrcIcons.gmk
>>
>> is incorrectly parsed, resulting in the tree name "jd" instead of "jdk"
>> (and "jaxw" for "jaxws" etc).
>>
>> I have a patch which solves the problem for me (inlined below), but I'm
>> a bit bewildered. This error must have been present since the support
>> for trees were added. Why have this not been discovered? Have the
>> tstatus output changed? Is this some local configuration difference for
>> my setup?
>>
>> diff --git a/webrev.ksh b/webrev.ksh
>> --- a/webrev.ksh
>> +++ b/webrev.ksh
>> @@ -1420,7 +1420,7 @@
>> # the AWK code which still tries to handle both cases
>> #
>> hg tstatus -mdn $FSTAT_OPT 2>/dev/null | $FILTER | $AWK -v
>> "hgroot=$hgroot" '
>> - /^\[.*\]:$/ {tree=substr($1,length(hgroot)+3);
>> tree=substr(tree,0,length(tree)-2); next}
>> + /^\[.*\]:$/ {tree=substr($1,length(hgroot)+3);
>> tree=substr(tree,0,length(tree)-1); next}
>> $1 != "" {n=index($1,tree);
>> if (n != 1)
>> { printf("%s/%s\n",tree,$1)}
>>
>>
>>
>> /Magnus
>
More information about the webrev-dev
mailing list