get_source/hgforest.sh breaks "defpath -dgu"

Kelly O'Hair kelly.ohair at oracle.com
Tue Jun 26 21:54:17 UTC 2012


Here is the diff:


diff --git a/make/scripts/hgforest.sh b/make/scripts/hgforest.sh
--- a/make/scripts/hgforest.sh
+++ b/make/scripts/hgforest.sh
@@ -98,7 +98,8 @@
   (
     (
       if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
-        cline="hg clone ${pull_default}/${i} ${i}"
+        pull_newrepo="`echo ${pull_default}/${i} | sed -e 's@\([^:]/\)//*@\1 at g'`"
+        cline="hg clone ${pull_newrepo} ${i}"
         echo "# ${cline}"
         ( eval "${cline}" )
       else
@@ -121,7 +122,8 @@
     n=`expr ${n} '+' 1`
     (
       (
-          cline="hg clone ${pull_extra}/${i} ${i}"
+          pull_newextrarepo="`echo ${pull_extra}/${i} | sed -e 's@\([^:]/\)//*@\1 at g'`"
+          cline="hg clone ${pull_newextrarepo} ${i}"
           echo "# ${cline}"
           ( eval "${cline}" )
         echo "# exit code $?"



-kto

On Jun 26, 2012, at 2:28 PM, David Holmes wrote:

> On 27/06/2012 4:13 AM, Kelly O'Hair wrote:
>> 
>> On Jun 21, 2012, at 6:54 PM, David Holmes wrote:
>> 
>>> On 22/06/2012 2:19 AM, Kelly O'Hair wrote:
>>>> The key is how you ran the initial clone command, did you do this:
>>>> 
>>>>     hg clone http://hg.openjdk.java.net/jdk8/tl   yourTL
>>>> 
>>>> OR
>>>> 
>>>>     hg clone http://hg.openjdk.java.net/jdk8/tl/  yourTL
>>> 
>>> The latter. It really shouldn't matter of course.
>>> 
>>>> I could change the make/scripts/hgforest.sh to not append / when the base path already has it.
>>> 
>>> BTW for the closed repos the // was in two places - again presumably because the "extra path" ended in /
>>> 
>>> Arguably it is a mercurial bug - it should ignore // in paths. :(
>> 
>> How about if I add some kind of filter on the paths I create, e.g.
>>       sed -e 's@\([^:]/\)//*@\1 at g'
>> 
>> ???
> 
> If that works great! I don't read regex fluently :(
> 
> David
> 
>> -kto
>> 
>>> 
>>> Cheers,
>>> David
>>> 
>>>> -kto
>>>> 
>>>> 
>>>> On Jun 20, 2012, at 5:49 PM, David Holmes wrote:
>>>> 
>>>>> I just cloned the complete TL JDK8 forest by cloning the top repo then using get_source.sh to clone the other repos (open and closed).
>>>>> 
>>>>> At the top-level hgdefpath shows
>>>>> 
>>>>> /export/users/dh198349/jdk8>   hg defpath
>>>>>     default = http://hg.openjdk.java.net/jdk8/tl/
>>>>> default-push = None
>>>>> 
>>>>> I then went into the jdk repo to run "hg defpath -dgu dholmes" and got:
>>>>> 
>>>>> abort: http://hg.openjdk.java.net/jdk8/tl//jdk: Repository not found
>>>>> No hgrc files updated
>>>>> 
>>>>> Note the // prior to jdk. If I edit .hgrc/hgrc to change that to a / the defpath works.
>>>>> 
>>>>> Note that clones/pulls etc don't care about the // but the "defpath -dg" does.
>>>>> 
>>>>> All of the clones initiated via hgforest.sh have the // eg:
>>>>> 
>>>>> # Repos:  corba jaxp jaxws langtools jdk hotspot  jdk/src/closed jdk/make/closed jdk/test/closed hotspot/src/closed hotspot/test/closed deploy install sponsors pubs
>>>>> Starting on corba
>>>>> Starting on jaxp
>>>>> Starting on jaxws
>>>>> Starting on langtools
>>>>> # hg clone http://hg.openjdk.java.net/jdk8/tl//corba corba
>>>>> 
>>>>> David
>>>>> 
>>>> 
>> 




More information about the build-dev mailing list