On 03/04/14 17:15, Mike Duigou wrote:

On Apr 3 2014, at 08:23 , Wang Weijun <weijun.w...@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@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@g'`"
+          pull_newrepo="${pull_base}/${i}"
            path="`dirname ${i}`"
            if [ "${path}" != "." ] ; then
              times=0


This looks good to me.

I've run into this once or twice before too.

-Chris.


--Max

On Apr 3, 2014, at 19:42, Erik Joelsson <erik.joels...@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



Reply via email to