webrev -f not working?
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Wed Nov 5 12:49:16 UTC 2014
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