get_source.sh from ssh://host//path
Mike Duigou
mike.duigou at oracle.com
Thu Apr 3 16:15:45 UTC 2014
On Apr 3 2014, at 08:23 , Wang Weijun <weijun.wang at oracle.com> wrote:
> It looks like the problem is at
>
> common/bin/hgforest.sh:
> 222 pull_newrepo="`echo ${pull_base}/${i} | sed -e 's@\([^:]/\)//*@\1 at g'`"
>
> It tries to substitute all repeated slashes into one unless it's after a colon.
>
> *Mike*: Is that line really useful or just a beautifier?
I don't know unfortunately. I assume it was put there for a reason but I don't know whether it was cosmetic or functional.
If pull_base was stripped of trailing slashes then I suspect that this would be unnecessary.
Try this:
diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh
--- a/common/bin/hgforest.sh
+++ b/common/bin/hgforest.sh
@@ -216,10 +216,11 @@ else
pull_base="${pull_extra}"
fi
done
+ pull_base="`echo ${pull_base} | sed -e 's@[/]*$@@'`"
(
(
if [ "${command}" = "clone" -o "${command}" = "fclone" -o "${command}" = "tclone" ] ; then
- pull_newrepo="`echo ${pull_base}/${i} | sed -e 's@\([^:]/\)//*@\1 at g'`"
+ pull_newrepo="${pull_base}/${i}"
path="`dirname ${i}`"
if [ "${path}" != "." ] ; then
times=0
> --Max
>
> On Apr 3, 2014, at 19:42, Erik Joelsson <erik.joelsson at oracle.com> wrote:
>
>> I have had the same problem before and would also appreciate fixing it.
>>
>> /Erik
>>
>> On 2014-04-03 12:47, Weijun Wang wrote:
>>> Hi All
>>>
>>> I'm trying to clone jdk9 from one of my machines to another using ssh. The source was at ssh://host//space/jdk9/dev. Please note the double slash before "space" because it's not under my $HOME.
>>>
>>> Now I can clone the dev repo but if I go inside and call "sh get_source.sh", it shows trying to get a sub-repo from somewhere like
>>>
>>> ssh://host/space/jdk9/dev/corba
>>> ^ <-- only one slash
>>>
>>> and the error "remote: abort: there is no Mercurial repository here" shows up.
>>>
>>> What shall I do? Symlink the /space inside my $HOME on host? Or is it possible to enhance get_source.sh to deal with this?
>>>
>>> Thanks
>>> Max
>>
>
More information about the build-dev
mailing list