Artifact [ddf655d6a3]
Not logged in

Artifact ddf655d6a3f67d21a2c4dabeb003cd1e60bfc6cb:

Ticket change [ddf655d6a3] - Closed задача [74782e5f7c]: auto-discovery of a repository from a webpage плюс еще изменений 5 by stephan 2013-01-25 18:52:55.
D 2013-01-25T18:52:55.860
J comment It\swould\sbe\sa\snice\saddition\sif\sthere\swas\sa\sway\sfor\sa\swebpage\sto\sspecify\swhere\sits\ssource\srepository\swas,\sfor\sexample\sby\sincluding\sa\shtml\slink\selement\sin\sa\swebpage\s-\s\r\n<link\srel="fossil-repository"\shref="http://www.fossil-scm.org">\r\nThis\sway,\sone\scould\seasily\sget\sto\sthe\ssource\srepository\seven\sif\sthe\ssite\surl\sis\snot\sbeing\sserved\sby\sfossil\sdirectly.\s\s\r\n\r\nIt\swouldn't\smake\ssense\sfor\sthis\sto\sbe\sbuilt\sinto\s"clone";\sa\sseparate\s"autoclone"\scommand\sthat\sfetched\sthe\sgiven\surl\sand\slooked\sfor\sthe\slink\sreference\sand\sthen\scalled\s"clone".\s\s\sThis\sfunctionality\scan\sbe\sachieved\swith\san\sexternal\s2-line\sshell\sscript,\sbut\sthat\sgoes\sagainst\sfossil's\sall-in-one\sphilosophy.\n\n<hr><i>drh\sadded\son\s2010-03-19\s01:06:30:</i><br>\nI\sdo\snot\sunderstand\swhat\sis\sbeing\srequested\shere.\s\sPlease\selaborate.\n\n<hr><i>anonymous\sadded\son\s2010-03-19\s02:47:35:</i><br>\nIt\swould\snot\sbe\sa\sstretch\sto\ssay\sthat\sthis\sfeature\srequest\sis\spoorly\sthought-out,\sneedless\sbloat,\sor\sunnecessary.\r\n\r\nThe\sinspiration\scomes\sfrom\ssetting\sup\sa\sself-hosted\sproject\son\ssourceforge.\s\sThe\sproject\shomepage\sis\shttp://myproject.sourceforge.net/\swhich\scan\sbe\sredirected\s(with\sphp)\sto\ssome\sother\spage.\s\sAs\sit\sstands,\sI\sdon't\sthink\sfossil\swill\sfollow\sa\s301/302\shttp\sredirect,\sso\sit\swould\sdo\sno\sgood\sto\sinstruct\speople\sto\s"fossil\sclone\shttp://lilypad.sourceforge.net".\s\sThey\sneed\sto\sfind\sthe\sexplicit\surl\sof\sthe\srepository\sand\suse\s"fossil\sclone\shttp://lilypad.sourceforge.net/cgi-bin/lilypad.fsl"\s\s\sBut\swouldn't\sit\sbe\snice\sif\sthey\scould\sjust\suse\sthe\shome\spage?\s\s\r\n\r\nJust\sfollowing\sredirects\sis\shelpful\sbut\snot\senough\s-\swhat\sif\sthe\shome\spage\sis\sstill\ssome\splain\shtml\spage?\s\sSo\sinstead,\sif\sthe\shome\spage\shad\ssome\sindicator\son\sit\sto\sallow\sa\sprogram\sto\sdiscover\swhere\sthe\ssource\sis\s(similar\sto\srss\sautodiscovery)\sthen\san\sinterested\suser/developer\scould\sclone\sthe\srepository\sright\sfrom\sthe\shome\spage,\swithout\sneeding\sto\strack\sdown\sthe\slink\sto\sthe\sactual\srepository.\s\s(I\sdon't\sknow\sif\sany\sother\ssystems\shave\sa\ssimilar\sconvention,\sbut\sif\ssuch\sa\sthing\sbecame\swidespread\sthe\ssearch\sengines\scould\smake\suse\sof\sit)\r\n\r\nThe\seffect\swould\sbe\sroughly\sthe\ssame\sas\sthe\sshell\scommand:\r\n\r\n$\sfossil\sclone\s`curl\shttp://app-landing-page\s|\sgrep\s'<link\srel="fossil-source"\s'|\ssed\s's/.*href="[^"]"/\\1/'`\n\n<hr><i>anonymous\sadded\son\s2010-03-19\s06:48:33:</i><br>\nIMO,\sit\sis\snot\sa\sproblem\sof\sfossil.\sUse\sRewriteEngine\sor\swhatever\selse.\sIt\swould\sbe\senough.\sMy\sApache\s.htaccess\sis\slike:\r\n<verbatim>\r\n#\sYou\sdon't\sneed\sthis\spart:\r\n<FilesMatch\s"\\.repo$">\r\n\s\sOptions\s+ExecCGI\r\n\s\sAddHandler\scgi-script\s.repo\r\n\s\sRewriteEngine\sOff\r\n</FilesMatch>\r\n\r\n#\sBut\syou\sneed\sthis\s(you\smight\swant\sto\sreplace\sfoo.repo\swith\s/cgi-bin/foo.cgi):\r\nRewriteEngine\sOn\r\nRewriteCond\s%{HTTP_USER_AGENT}\s^Fossil/\\[[a-z0-9]{10}\\]\r\nRewriteRule\s^(.*)\s/foo.repo/$1\s[L]\r\n</verbatim>
J icomment Closing\sas\spart\sof\sspring\scleaning.
J login stephan
J mimetype text/x-fossil-plain
J resolution Rejected
J status Closed
K 74782e5f7cf9c3b3430c1b6debbc57c20fe7f3f8
U stephan
Z 99f0380105581eb1f333da25a612fa1f