Iceberg URL regex not matching how I would expect it to?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Iceberg URL regex not matching how I would expect it to?

Ian Ian
Hi All,

I am having trouble setting up iceberg to access my repository via ssh.

On the command line I assess it via:  git clone [hidden email]:/proj/proj.git and all works as expected.

When adding trying to add the same repository to iceberg I get a parseUrl error thrown from class IceScpRemote.  While debugging I see the following regex:

matcher := '(ssh\://)?([\w\-]+@)?([\w\-.]+)(\:[\d]+)?(\:|/)/?([\w\-]+)/([\w\-]+)(\.git)?' asRegex.

which parses [hidden email]:/directory/proj.git.

However fails to parse:  [hidden email]:/dir1/dir2/proj.git

The corrected version is as follows:

matcher := '(ssh\://)?([\w\-]+@)?([\w\-.]+)(\:[\d]+)?(\:|/)/?(([\w\-]+)/)+([\w\-]+)(\.git)?' asRegex.

Questions:

Is this by design?
of the top of your head:  If I use the corrected version am I going to run into other issues?


NB:  I am using 64 bit Pharo 6.0 Update: #60520

Thanks in advance,


Reply | Threaded
Open this post in threaded view
|

Re: Iceberg URL regex not matching how I would expect it to?

Julián Maestri-2
[hidden email]:/proj/proj.git

Isn't it: [hidden email]:user/project.git ?

On Dec 24, 2017 15:36, "Ian Ian" <[hidden email]> wrote:
Hi All,

I am having trouble setting up iceberg to access my repository via ssh.

On the command line I assess it via:  git clone [hidden email]:/proj/proj.git and all works as expected.

When adding trying to add the same repository to iceberg I get a parseUrl error thrown from class IceScpRemote.  While debugging I see the following regex:

matcher := '(ssh\://)?([\w\-]+@)?([\w\-.]+)(\:[\d]+)?(\:|/)/?([\w\-]+)/([\w\-]+)(\.git)?' asRegex.

which parses [hidden email]:/directory/proj.git.

However fails to parse:  [hidden email]:/dir1/dir2/proj.git

The corrected version is as follows:

matcher := '(ssh\://)?([\w\-]+@)?([\w\-.]+)(\:[\d]+)?(\:|/)/?(([\w\-]+)/)+([\w\-]+)(\.git)?' asRegex.

Questions:

Is this by design?
of the top of your head:  If I use the corrected version am I going to run into other issues?


NB:  I am using 64 bit Pharo 6.0 Update: #60520

Thanks in advance,