You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm-dev@maven.apache.org by Dennis Lundberg <de...@mdh.se> on 2006/01/21 13:16:53 UTC

What should be the format for a valid scm url?

Hi

I've been working with Lukas on the Maven 1 plugins team to resolve an 
issue in maven-changelog-plugin for Maven 1. He posed a valid question 
in that discussion, which led me to write this message.

SCM-106 makes it possible to use "|" as a separator character between 
"scm" and the rest of the scm url. That way you can have *only* ":" or 
*only* "|" as your separator.

However it is also possible to use an scm url like the one below, and it 
is considered valid in maven-scm-beta-3-SNAPSHOT:
   scm:cvs|pserver|anoncvs@cvs.apache.org|/home/cvspublic|module

Lukas asked me this:
   "Shouldn't the separator be set to the character after the 'scm'?"

My first thought was: of course it should. But when I looked at the code 
for maven-scm and found that this is not the case. So as I see it we 
have two alternatives here, regarding what url:s are valid:

1. The way it works now
scm:<provider>:<provider specific stuff>
scm:<provider>|<provider specific stuff>
scm|<provider>|<provider specific stuff>

2. More consistent way of handling the separator
scm:<provider>:<provider specific stuff>
scm|<provider>|<provider specific stuff>

The upside of using 2. is that it makes parsing of scm url:s much easier.

The downside of going with 2 is that there might be a few scm url:s out 
there using the "scm:<provider>|<provider specific stuff>" format, which 
would no longer work.

Thoughts anyone?

-- 
Dennis Lundberg

Re: What should be the format for a valid scm url?

Posted by Emmanuel Venisse <em...@venisse.net>.
No problem Lukas. It can be done in next version.

Emmanuel

Lukas Theussl a écrit :
> You are right, it's not currently used and I totally agree that it 
> should be. However, I am just now preparing a new release which I expect 
> to be ready next week (when MPCHANGELOG-81 is resolved), and I don't 
> want to hold that back now.
> 
> -Lukas
> 
> 
> Emmanuel Venisse wrote:
> 
>> Do you use maven-scm in changelog plugin? I guess it isn't (same thing 
>> for m2 changelog plugin)
>> I think it will be a good idea to use it for scm url parsing and 
>> changelog command, so this plugin will do only the page result 
>> generation from changelog output and will can obtain bug fixes from 
>> maven-scm, support of all scm tools, and code won't be redundant.
>>
>> Emmanuel
>>
>> Dennis Lundberg a écrit :
>>
>>> Hi
>>>
>>> I've been working with Lukas on the Maven 1 plugins team to resolve 
>>> an issue in maven-changelog-plugin for Maven 1. He posed a valid 
>>> question in that discussion, which led me to write this message.
>>>
>>> SCM-106 makes it possible to use "|" as a separator character between 
>>> "scm" and the rest of the scm url. That way you can have *only* ":" 
>>> or *only* "|" as your separator.
>>>
>>> However it is also possible to use an scm url like the one below, and 
>>> it is considered valid in maven-scm-beta-3-SNAPSHOT:
>>>   scm:cvs|pserver|anoncvs@cvs.apache.org|/home/cvspublic|module
>>>
>>> Lukas asked me this:
>>>   "Shouldn't the separator be set to the character after the 'scm'?"
>>>
>>> My first thought was: of course it should. But when I looked at the 
>>> code for maven-scm and found that this is not the case. So as I see 
>>> it we have two alternatives here, regarding what url:s are valid:
>>>
>>> 1. The way it works now
>>> scm:<provider>:<provider specific stuff>
>>> scm:<provider>|<provider specific stuff>
>>> scm|<provider>|<provider specific stuff>
>>>
>>> 2. More consistent way of handling the separator
>>> scm:<provider>:<provider specific stuff>
>>> scm|<provider>|<provider specific stuff>
>>>
>>> The upside of using 2. is that it makes parsing of scm url:s much 
>>> easier.
>>>
>>> The downside of going with 2 is that there might be a few scm url:s 
>>> out there using the "scm:<provider>|<provider specific stuff>" 
>>> format, which would no longer work.
>>>
>>> Thoughts anyone?
>>>
>>
> 
> 
> 


Re: What should be the format for a valid scm url?

Posted by Lukas Theussl <lt...@apache.org>.
You are right, it's not currently used and I totally agree that it 
should be. However, I am just now preparing a new release which I expect 
to be ready next week (when MPCHANGELOG-81 is resolved), and I don't 
want to hold that back now.

-Lukas


Emmanuel Venisse wrote:
> Do you use maven-scm in changelog plugin? I guess it isn't (same thing 
> for m2 changelog plugin)
> I think it will be a good idea to use it for scm url parsing and 
> changelog command, so this plugin will do only the page result 
> generation from changelog output and will can obtain bug fixes from 
> maven-scm, support of all scm tools, and code won't be redundant.
> 
> Emmanuel
> 
> Dennis Lundberg a écrit :
> 
>> Hi
>>
>> I've been working with Lukas on the Maven 1 plugins team to resolve an 
>> issue in maven-changelog-plugin for Maven 1. He posed a valid question 
>> in that discussion, which led me to write this message.
>>
>> SCM-106 makes it possible to use "|" as a separator character between 
>> "scm" and the rest of the scm url. That way you can have *only* ":" or 
>> *only* "|" as your separator.
>>
>> However it is also possible to use an scm url like the one below, and 
>> it is considered valid in maven-scm-beta-3-SNAPSHOT:
>>   scm:cvs|pserver|anoncvs@cvs.apache.org|/home/cvspublic|module
>>
>> Lukas asked me this:
>>   "Shouldn't the separator be set to the character after the 'scm'?"
>>
>> My first thought was: of course it should. But when I looked at the 
>> code for maven-scm and found that this is not the case. So as I see it 
>> we have two alternatives here, regarding what url:s are valid:
>>
>> 1. The way it works now
>> scm:<provider>:<provider specific stuff>
>> scm:<provider>|<provider specific stuff>
>> scm|<provider>|<provider specific stuff>
>>
>> 2. More consistent way of handling the separator
>> scm:<provider>:<provider specific stuff>
>> scm|<provider>|<provider specific stuff>
>>
>> The upside of using 2. is that it makes parsing of scm url:s much easier.
>>
>> The downside of going with 2 is that there might be a few scm url:s 
>> out there using the "scm:<provider>|<provider specific stuff>" format, 
>> which would no longer work.
>>
>> Thoughts anyone?
>>
> 

Re: What should be the format for a valid scm url?

Posted by Emmanuel Venisse <em...@venisse.net>.
Do you use maven-scm in changelog plugin? I guess it isn't (same thing for m2 changelog plugin)
I think it will be a good idea to use it for scm url parsing and changelog command, so this plugin 
will do only the page result generation from changelog output and will can obtain bug fixes from 
maven-scm, support of all scm tools, and code won't be redundant.

Emmanuel

Dennis Lundberg a écrit :
> Hi
> 
> I've been working with Lukas on the Maven 1 plugins team to resolve an 
> issue in maven-changelog-plugin for Maven 1. He posed a valid question 
> in that discussion, which led me to write this message.
> 
> SCM-106 makes it possible to use "|" as a separator character between 
> "scm" and the rest of the scm url. That way you can have *only* ":" or 
> *only* "|" as your separator.
> 
> However it is also possible to use an scm url like the one below, and it 
> is considered valid in maven-scm-beta-3-SNAPSHOT:
>   scm:cvs|pserver|anoncvs@cvs.apache.org|/home/cvspublic|module
> 
> Lukas asked me this:
>   "Shouldn't the separator be set to the character after the 'scm'?"
> 
> My first thought was: of course it should. But when I looked at the code 
> for maven-scm and found that this is not the case. So as I see it we 
> have two alternatives here, regarding what url:s are valid:
> 
> 1. The way it works now
> scm:<provider>:<provider specific stuff>
> scm:<provider>|<provider specific stuff>
> scm|<provider>|<provider specific stuff>
> 
> 2. More consistent way of handling the separator
> scm:<provider>:<provider specific stuff>
> scm|<provider>|<provider specific stuff>
> 
> The upside of using 2. is that it makes parsing of scm url:s much easier.
> 
> The downside of going with 2 is that there might be a few scm url:s out 
> there using the "scm:<provider>|<provider specific stuff>" format, which 
> would no longer work.
> 
> Thoughts anyone?
> 


Re: What should be the format for a valid scm url?

Posted by Emmanuel Venisse <em...@venisse.net>.
I'm agree.

Lukas Theussl a écrit :
> According to [1], the format for a scm url is
> 
> scm<delimiter><scm_provider><delimiter><provider_specific_part>
> 
> ie, scm:<provider>|<provider specific stuff> would not be a valid form. 
> I would also find it confusing if there were other colons in one of the 
> variables, so I think it should not be allowed.
> 
> -Lukas
> 
> 
> [1] http://maven.apache.org/scm/scm-url-format.html
> 
> 
> 
> Dennis Lundberg wrote:
> 
>> Hi
>>
>> I've been working with Lukas on the Maven 1 plugins team to resolve an 
>> issue in maven-changelog-plugin for Maven 1. He posed a valid question 
>> in that discussion, which led me to write this message.
>>
>> SCM-106 makes it possible to use "|" as a separator character between 
>> "scm" and the rest of the scm url. That way you can have *only* ":" or 
>> *only* "|" as your separator.
>>
>> However it is also possible to use an scm url like the one below, and 
>> it is considered valid in maven-scm-beta-3-SNAPSHOT:
>>   scm:cvs|pserver|anoncvs@cvs.apache.org|/home/cvspublic|module
>>
>> Lukas asked me this:
>>   "Shouldn't the separator be set to the character after the 'scm'?"
>>
>> My first thought was: of course it should. But when I looked at the 
>> code for maven-scm and found that this is not the case. So as I see it 
>> we have two alternatives here, regarding what url:s are valid:
>>
>> 1. The way it works now
>> scm:<provider>:<provider specific stuff>
>> scm:<provider>|<provider specific stuff>
>> scm|<provider>|<provider specific stuff>
>>
>> 2. More consistent way of handling the separator
>> scm:<provider>:<provider specific stuff>
>> scm|<provider>|<provider specific stuff>
>>
>> The upside of using 2. is that it makes parsing of scm url:s much easier.
>>
>> The downside of going with 2 is that there might be a few scm url:s 
>> out there using the "scm:<provider>|<provider specific stuff>" format, 
>> which would no longer work.
>>
>> Thoughts anyone?
>>
> 
> 
> 


Re: What should be the format for a valid scm url?

Posted by Dennis Lundberg <de...@apache.org>.
One new patch, coming up...

-- 
Dennis Lundberg

Lukas Theussl wrote:
> I'm fine with that too, as long as the documentation gets updated 
> accordingly.
> 
> Dennis, can you attach a new patch for MPCHANGELOG-81? I'd like to 
> release it this week.
> 
> Cheers,
> -Lukas
> 
> 
> Emmanuel Venisse wrote:
>> Yes, an url must have this syntax that was supported until few days 
>> before your patch (SCM-106).
>> I prefer too that scm url start with scm:, so we'll respect URI 
>> standard format.You can provide a new patch for code and docs and i'll 
>> apply it.
>>
>> Your previous patch wasn't in previoys release, so if you send a new 
>> patch, there won't be any difference for users.
>>
>> Emmanuel
>>
>> Dennis Lundberg a écrit :
>>
>>> I've had some more time to think about this. We called it an SCM URL, 
>>> so that would mean that it is a URL of some sort. Having had a look 
>>> at RFC2396 [2] section 3 "URI Syntactic Components", the syntax for a 
>>> URI is:
>>>
>>>   <scheme>:<scheme-specific-part>
>>>
>>> URIs start with the scheme, which in our case is "scm", followed by a 
>>> colon. What comes after the scheme is up to the maintainer of the 
>>> scheme to decide upon.
>>>
>>> So according to that we should not allow SCM URLs that start with 
>>> "scm|" because that would make it a non-URI.
>>>
>>> We still need to define the scheme-specific-part, though.
>>>
>>>
>>> [2] http://www.ietf.org/rfc/rfc2396.txt
>>>
>>


Re: What should be the format for a valid scm url?

Posted by Lukas Theussl <lt...@apache.org>.
I'm fine with that too, as long as the documentation gets updated 
accordingly.

Dennis, can you attach a new patch for MPCHANGELOG-81? I'd like to 
release it this week.

Cheers,
-Lukas


Emmanuel Venisse wrote:
> Yes, an url must have this syntax that was supported until few days 
> before your patch (SCM-106).
> I prefer too that scm url start with scm:, so we'll respect URI standard 
> format.You can provide a new patch for code and docs and i'll apply it.
> 
> Your previous patch wasn't in previoys release, so if you send a new 
> patch, there won't be any difference for users.
> 
> Emmanuel
> 
> Dennis Lundberg a écrit :
> 
>> I've had some more time to think about this. We called it an SCM URL, 
>> so that would mean that it is a URL of some sort. Having had a look at 
>> RFC2396 [2] section 3 "URI Syntactic Components", the syntax for a URI 
>> is:
>>
>>   <scheme>:<scheme-specific-part>
>>
>> URIs start with the scheme, which in our case is "scm", followed by a 
>> colon. What comes after the scheme is up to the maintainer of the 
>> scheme to decide upon.
>>
>> So according to that we should not allow SCM URLs that start with 
>> "scm|" because that would make it a non-URI.
>>
>> We still need to define the scheme-specific-part, though.
>>
>>
>> [2] http://www.ietf.org/rfc/rfc2396.txt
>>
> 

Re: What should be the format for a valid scm url?

Posted by Emmanuel Venisse <em...@venisse.net>.
reopen it

Emmanuel

Dennis Lundberg a écrit :
> Emmanuel Venisse wrote:
> 
>> Yes, an url must have this syntax that was supported until few days 
>> before your patch (SCM-106).
>> I prefer too that scm url start with scm:, so we'll respect URI 
>> standard format.You can provide a new patch for code and docs and i'll 
>> apply it.
> 
> 
> I'll put together a patch. Should I add e new issue in JIRA for it or 
> should we reopen SCM-106?
> 
>> Your previous patch wasn't in previoys release, so if you send a new 
>> patch, there won't be any difference for users.
> 
> 
> Yes, we are still in-between-releases, so no harm done.
> 
>> Emmanuel
> 
> 


Re: What should be the format for a valid scm url?

Posted by Dennis Lundberg <de...@apache.org>.
Emmanuel Venisse wrote:
> Yes, an url must have this syntax that was supported until few days 
> before your patch (SCM-106).
> I prefer too that scm url start with scm:, so we'll respect URI standard 
> format.You can provide a new patch for code and docs and i'll apply it.

I'll put together a patch. Should I add e new issue in JIRA for it or 
should we reopen SCM-106?

> Your previous patch wasn't in previoys release, so if you send a new 
> patch, there won't be any difference for users.

Yes, we are still in-between-releases, so no harm done.

> Emmanuel

-- 
Dennis Lundberg

> 
> Dennis Lundberg a écrit :
>> I've had some more time to think about this. We called it an SCM URL, 
>> so that would mean that it is a URL of some sort. Having had a look at 
>> RFC2396 [2] section 3 "URI Syntactic Components", the syntax for a URI 
>> is:
>>
>>   <scheme>:<scheme-specific-part>
>>
>> URIs start with the scheme, which in our case is "scm", followed by a 
>> colon. What comes after the scheme is up to the maintainer of the 
>> scheme to decide upon.
>>
>> So according to that we should not allow SCM URLs that start with 
>> "scm|" because that would make it a non-URI.
>>
>> We still need to define the scheme-specific-part, though.
>>
>>
>> [2] http://www.ietf.org/rfc/rfc2396.txt
>>
> 




Re: What should be the format for a valid scm url?

Posted by Emmanuel Venisse <em...@venisse.net>.
Yes, an url must have this syntax that was supported until few days before your patch (SCM-106).
I prefer too that scm url start with scm:, so we'll respect URI standard format.You can provide a 
new patch for code and docs and i'll apply it.

Your previous patch wasn't in previoys release, so if you send a new patch, there won't be any 
difference for users.

Emmanuel

Dennis Lundberg a écrit :
> I've had some more time to think about this. We called it an SCM URL, so 
> that would mean that it is a URL of some sort. Having had a look at 
> RFC2396 [2] section 3 "URI Syntactic Components", the syntax for a URI is:
> 
>   <scheme>:<scheme-specific-part>
> 
> URIs start with the scheme, which in our case is "scm", followed by a 
> colon. What comes after the scheme is up to the maintainer of the scheme 
> to decide upon.
> 
> So according to that we should not allow SCM URLs that start with "scm|" 
> because that would make it a non-URI.
> 
> We still need to define the scheme-specific-part, though.
> 
> 
> [2] http://www.ietf.org/rfc/rfc2396.txt
> 


Re: What should be the format for a valid scm url?

Posted by Dennis Lundberg <de...@apache.org>.
I've had some more time to think about this. We called it an SCM URL, so 
that would mean that it is a URL of some sort. Having had a look at 
RFC2396 [2] section 3 "URI Syntactic Components", the syntax for a URI is:

   <scheme>:<scheme-specific-part>

URIs start with the scheme, which in our case is "scm", followed by a 
colon. What comes after the scheme is up to the maintainer of the scheme 
to decide upon.

So according to that we should not allow SCM URLs that start with "scm|" 
because that would make it a non-URI.

We still need to define the scheme-specific-part, though.


[2] http://www.ietf.org/rfc/rfc2396.txt

-- 
Dennis Lundberg

Lukas Theussl wrote:
> According to [1], the format for a scm url is
> 
> scm<delimiter><scm_provider><delimiter><provider_specific_part>
> 
> ie, scm:<provider>|<provider specific stuff> would not be a valid form. 
> I would also find it confusing if there were other colons in one of the 
> variables, so I think it should not be allowed.
> 
> -Lukas
> 
> 
> [1] http://maven.apache.org/scm/scm-url-format.html
> 
> 
> 
> Dennis Lundberg wrote:
>> Hi
>>
>> I've been working with Lukas on the Maven 1 plugins team to resolve an 
>> issue in maven-changelog-plugin for Maven 1. He posed a valid question 
>> in that discussion, which led me to write this message.
>>
>> SCM-106 makes it possible to use "|" as a separator character between 
>> "scm" and the rest of the scm url. That way you can have *only* ":" or 
>> *only* "|" as your separator.
>>
>> However it is also possible to use an scm url like the one below, and 
>> it is considered valid in maven-scm-beta-3-SNAPSHOT:
>>   scm:cvs|pserver|anoncvs@cvs.apache.org|/home/cvspublic|module
>>
>> Lukas asked me this:
>>   "Shouldn't the separator be set to the character after the 'scm'?"
>>
>> My first thought was: of course it should. But when I looked at the 
>> code for maven-scm and found that this is not the case. So as I see it 
>> we have two alternatives here, regarding what url:s are valid:
>>
>> 1. The way it works now
>> scm:<provider>:<provider specific stuff>
>> scm:<provider>|<provider specific stuff>
>> scm|<provider>|<provider specific stuff>
>>
>> 2. More consistent way of handling the separator
>> scm:<provider>:<provider specific stuff>
>> scm|<provider>|<provider specific stuff>
>>
>> The upside of using 2. is that it makes parsing of scm url:s much easier.
>>
>> The downside of going with 2 is that there might be a few scm url:s 
>> out there using the "scm:<provider>|<provider specific stuff>" format, 
>> which would no longer work.
>>
>> Thoughts anyone?
>>


Re: What should be the format for a valid scm url?

Posted by Lukas Theussl <lt...@apache.org>.
According to [1], the format for a scm url is

scm<delimiter><scm_provider><delimiter><provider_specific_part>

ie, scm:<provider>|<provider specific stuff> would not be a valid form. 
I would also find it confusing if there were other colons in one of the 
variables, so I think it should not be allowed.

-Lukas


[1] http://maven.apache.org/scm/scm-url-format.html



Dennis Lundberg wrote:
> Hi
> 
> I've been working with Lukas on the Maven 1 plugins team to resolve an 
> issue in maven-changelog-plugin for Maven 1. He posed a valid question 
> in that discussion, which led me to write this message.
> 
> SCM-106 makes it possible to use "|" as a separator character between 
> "scm" and the rest of the scm url. That way you can have *only* ":" or 
> *only* "|" as your separator.
> 
> However it is also possible to use an scm url like the one below, and it 
> is considered valid in maven-scm-beta-3-SNAPSHOT:
>   scm:cvs|pserver|anoncvs@cvs.apache.org|/home/cvspublic|module
> 
> Lukas asked me this:
>   "Shouldn't the separator be set to the character after the 'scm'?"
> 
> My first thought was: of course it should. But when I looked at the code 
> for maven-scm and found that this is not the case. So as I see it we 
> have two alternatives here, regarding what url:s are valid:
> 
> 1. The way it works now
> scm:<provider>:<provider specific stuff>
> scm:<provider>|<provider specific stuff>
> scm|<provider>|<provider specific stuff>
> 
> 2. More consistent way of handling the separator
> scm:<provider>:<provider specific stuff>
> scm|<provider>|<provider specific stuff>
> 
> The upside of using 2. is that it makes parsing of scm url:s much easier.
> 
> The downside of going with 2 is that there might be a few scm url:s out 
> there using the "scm:<provider>|<provider specific stuff>" format, which 
> would no longer work.
> 
> Thoughts anyone?
>