Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 7228] url_svn handler for subversion.

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT metalab.unc.edu
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 7228] url_svn handler for subversion.
  • Date: Tue, 10 Aug 2004 03:48:30 -0400

http://bugs.sourcemage.org/show_bug.cgi?id=7228





------- Additional Comments From acedit AT armory.com 2004-08-10 03:48 -------
url_*_hostname simply returns the hostname of the url, see url_http
and url_cvs for examples. Nothing more than sed-fu.

url_*_netselect used to be defined as taking one url but i recently
expanded it to take any number of urls as parameters. It can handle
them in serial or parallel. This is mostly limited by the degree in which
netselect can parse and re-assemble the url(s).

For cvs I've taken the approach of serializing since there are
likely to be few mirrors, and netselect doesnt deal well with those urls,
I end up having to take it apart, get the hostname and then put things
back together again.

For (ftp|http|https) I've taken the parallel approach because netselect
understands that form of url, and theres a high probability of a large
number of urls for these types now that we do url expanding (see any
sf.net or gnu.org spell).

If you can make the hostname function work the netselect function
will magically work.

Using your sample url as an example we would want to return
svn.pld-linux.org

I think the hostname functions from http/ftp/https work fine.

function url_svn_hostname() {
echo $1|sed 's:^.*//\([^/]*\).*$:\1:'
}

Try that on some various url permutations.

One nitpick im going to raise is that for your url format you've defined:
svn://SVNURL:DIR_NAME
or
svn://SVNURL:DIR_NAME:REVISION_TAG

However the SVNURL typically contains a : in itself, since its
defined as a "normail" http url ;) I believe that makes the
structure more ambiguous. Im going to venture that you are making
the assumption that there will always be http:// in the SVNURL
and therefore always a colon. So perhaps you could be more direct
in stating that so there is less magic to sort through for a future
maintainer. Something along the lines of how there are always
2 or 3 colons, not 1 or 2, or define the url structure such that the
extra colon is included more obviously in the definition.

After that I think we're good to go.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




Archive powered by MHonArc 2.6.24.

Top of Page