Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-07 Thread Stephan Beal
On Wed, Apr 7, 2010 at 1:10 PM, Joshua Paine  wrote:

> On 04/07/2010 06:55 AM, Stephan Beal wrote:
> > A link in the form  > href='/repos'>... resolves (incorrectly) to:
> >
> >
> http://fossil.wanderinghorse.net/repos/JSONMessage/index.cgi/%27/repos%27
>
> In HTML, attributes may be quoted with single quotes or double quotes,
> but most people and software use double quotes.
>
> ...
>
It rather looks like your browser mishandled your single-quoted
> attribute there, which would be pretty weird. Try it with the double
> quotes.
>

Right: when i use double-quotes it is processed as expected. But IMO this is
not a browser bug but Fossil's parsing of the attributes (which apparently
only accounts for double-quotes). Browser==Firefox 3.something, BTW.

i say it's a fossil bug because the generated single-quote HREF link renders
as:

test link with A HREF single-quoted


which is obviously wrong.

Various examples:

http://fossil.wanderinghorse.net/repos/JSONMessage/index.cgi/wiki?name=Sandbox


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-07 Thread Joshua Paine
On 04/07/2010 06:55 AM, Stephan Beal wrote:
> A link in the form  href='/repos'>... resolves (incorrectly) to:
>
> http://fossil.wanderinghorse.net/repos/JSONMessage/index.cgi/%27/repos%27

In HTML, attributes may be quoted with single quotes or double quotes, 
but most people and software use double quotes.

 ...

It rather looks like your browser mishandled your single-quoted 
attribute there, which would be pretty weird. Try it with the double quotes.

-- 
Joshua Paine
LetterBlock LLC
http://letterblock.com/
Web applications built with joy.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-07 Thread Stephan Beal
On Wed, Apr 7, 2010 at 12:37 PM, Stephan Beal  wrote:

> Yup. See:
>
>
> http://fossil.wanderinghorse.net/repos/JSONMessage/index.cgi/wiki?name=Sandbox
>
> i've put a link in the form [/repos] there and it resolves to:
>
> http://fossil.wanderinghorse.net/repos/JSONMessage/index.cgi/repos
>

Sorry, i half-lied there:

A link in the form [/repos] resolves as above. A link in the form ... resolves (incorrectly) to:

http://fossil.wanderinghorse.net/repos/JSONMessage/index.cgi/%27/repos%27


A link in the form ... (which IS NOT valid HTML) resolves
to:

http://fossil.wanderinghorse.net/repos

yeah! (Except that the link requires invalid HTML.)

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-07 Thread Joshua Paine
On 04/07/2010 06:37 AM, Stephan Beal wrote:
> i've put a link in the form [/repos] there and it resolves to:
>
> http://fossil.wanderinghorse.net/repos/JSONMessage/index.cgi/repos

Sure... but if you just write the link in HTML (which fossil wiki allows 
and allows to be mixed with wiki) instead of wiki markup:

 test link

Then you'll have a link to 

-- 
Joshua Paine
LetterBlock LLC
http://letterblock.com/
Web applications built with joy.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-07 Thread Stephan Beal
On Wed, Apr 7, 2010 at 12:27 PM, Joshua Paine wrote:

> browser, fossil has converted your link to  href="/Project/index.cgi/foo">Foo ?  Are you sure? I can't reproduce
> that at all--for me fossil isn't messing with my hand-written links.
>

Yup. See:

http://fossil.wanderinghorse.net/repos/JSONMessage/index.cgi/wiki?name=Sandbox

i've put a link in the form [/repos] there and it resolves to:

http://fossil.wanderinghorse.net/repos/JSONMessage/index.cgi/repos


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-07 Thread Joshua Paine
On 04/07/2010 02:16 AM, Stephan Beal wrote:
> i tried that, but in CGI mode my index.cgi _is_ my root dir (as far as
> Fossil CGI is concerned).

Wait... so if on a fossil wiki page, you type Foo 
(the leading slash being essential), when you view that page in the 
browser, fossil has converted your link to Foo ?  Are you sure? I can't reproduce 
that at all--for me fossil isn't messing with my hand-written links. 
'Cause if it's not messing with the HREF of your links, it doesn't 
matter what fossil or Apache or the CGI gnomes think your root URL 
is-- is still going to be a link to 
'http://this-domain.com/foo'.

> Locally i
> don't use CGI, but use "fossil ui" instead (much more convenient), which
> of course is rooted in the repo.

Right--so such links won't (and never could) work in fossil ui. To make 
them work in production and on your local dev machine, you'd have to use 
CGI  for fossil on your local machine, too--on the same domain as your 
local demo pages.

-- 
Joshua Paine
LetterBlock LLC
http://letterblock.com/
Web applications built with joy.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-06 Thread Stephan Beal
On Wed, Apr 7, 2010 at 1:04 AM, Joshua Paine  wrote:

> You do not have to hard-code the server name so long as its the same as
> the fossil repo is being served through. Just linking to "/foo/bar"
> means "http://whatever-domain-we-are-on-now.com/foo/bar";. It's the / at
> the beginning that does that--just like a *nix filesystem path: `cd foo`
> changes to 'working_directory/foo', but `cd /foo` changes to /foo.
>

i tried that, but in CGI mode my index.cgi _is_ my root dir (as far as
Fossil CGI is concerned).

My setup is:

Apache on 3rd-party hoster:

http://fossil.wanderinghorse.net

under /repos/ i have 12 or 15 repositories, each set up like:

repos/REPONAME/index.cgi

If i visit http:///repo/Project, apache redirects me to
/.../Project/index.cgi, and that ends up being the top path for any absolute
OR relative links i add in Fossil (strangely enough, but i think that
actually makes an iota of sense for most CGI apps). Locally i don't use CGI,
but use "fossil ui" instead (much more convenient), which of course is
rooted in the repo.


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-06 Thread Joshua Paine
On 04/06/2010 06:10 PM, Stephan Beal wrote:
> THAT i didn't think of: i could move the demo path outside of the CGI's
> path while still keeping it in the webroot. That would almost solve my
> problem, except that i still have to (a) hard-code the server name in
> the Wiki link and

You do not have to hard-code the server name so long as its the same as 
the fossil repo is being served through. Just linking to "/foo/bar" 
means "http://whatever-domain-we-are-on-now.com/foo/bar";. It's the / at 
the beginning that does that--just like a *nix filesystem path: `cd foo` 
changes to 'working_directory/foo', but `cd /foo` changes to /foo.

-- 
Joshua Paine
LetterBlock LLC
http://letterblock.com/
Web applications built with joy.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-06 Thread Stephan Beal
On Wed, Apr 7, 2010 at 12:06 AM, Joshua Paine wrote:

> the PHP correctly. If 

were the right path, and it were working, you'd just write your link
> like My Demo.
>

THAT i didn't think of: i could move the demo path outside of the CGI's path
while still keeping it in the webroot. That would almost solve my problem,
except that i still have to (a) hard-code the server name in the Wiki link
and (b) i can't redirect that server name via /etc/hosts entries because i
also want to be able to access the public site.



> But I think you said you also want it to work via `fossil ui`. That's
> impossible in plain HTML. `fossil ui` will start and connect to a web
>

i don't need the app to run in "ui", i just would like to be able to link to
a server-local subdir (or a higher-level dir, as you just suggested) from a
wiki page running in ui mode.

i think the higher-up dir would serve my purpose better than my current
approach - i'll give that a try.

:)

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-06 Thread Stephan Beal
On Tue, Apr 6, 2010 at 11:36 PM, Rene de Zwart  wrote:

> Its is a bit odd to run 2 http servers (well maybe not that odd)
>

Fossil's running on my remote box as a CGI. On my local box apache serves 5
or 6 sites and fossil (on 8080) runs in ui mode quite often.


>   use a link or a path to get de directory into the pages that apache
> will serve. you could do [http://localhost/fossil/demo/my.php|php
> demo].
>

That's what i do, but when i then upload to my remote repo that path no
longer works, and i don't want to update the wiki on every commit. Currently
i hard-code the link to the public site, and i don't see any way around
that. Maybe i could do it in TH, but that sounds like more hassle than it's
worth (i'm the only person affected by this problem).


> It is the basic theme you could improve with virtual hosts so that your
> development  system uses the same naming (of course you have to edit your
> local hostfile )
>

The development team == me, so nobody's hurting from this. Locally i
have/use vhosts, but i want to avoid setting up another subdomain on my
provider just for this mini-project.

Thanks for the attempt, though :).

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-06 Thread Joshua Paine
So, you need to link to a PHP file which will be run by Apache under the 
same domain and port as your wiki pages, right? If that's correct, this 
shouldn't be too hard.

The first thing is to make sure you've got Apache configured to serve 
the PHP correctly. If  
were the right path, and it were working, you'd just write your link 
like My Demo.

The link should then work anywhere that you have your Apache + fossil 
setup the same way as on fossil.wanderinghorse.net.

But I think you said you also want it to work via `fossil ui`. That's 
impossible in plain HTML. `fossil ui` will start and connect to a web 
server on a different port than your local dev web server. There's no 
way to write a link that specifies the port but does not specify a 
domain name.

If, however, you configure your local dev server to serve your local 
fossil repo via CGI on the same local domain as you're testing your work 
on, then a simple link like above should be fine.

-- 
Joshua Paine
LetterBlock LLC
http://letterblock.com/
Web applications built with joy.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-06 Thread Rene de Zwart

Op Di, 6 april, 2010 23:03, schreef Stephan Beal:
> On Tue, Apr 6, 2010 at 9:10 PM, verizon  wrote:
>
>> From advice I got previously here is how I can access a PDF that is in
>> the
>> repository with a relative link (works both locally and in a server)
>>
>> [http:doc/tip/Ethernet/DOCS/npincomplete.pdf | Code Description (pdf) ]
>>
>
> That won't work in this case because...
>
> The document i need to serve is a demo PHP page, which must be served by
> the
> underlying web server. It uses JavaScript which requires a web server to
> be
> able to POST messages to (it's an RPC framework, so it's all about passing
> messages to/from the web server).
>
> i was hoping i could link non-fossil'd subdirs without using absolute URLs
> (including domain), but i haven't found a way to do it. They would be
> useful
> because my public website is mirrored on my system, so i could simplify
> local testing before updating the public server. But no big deal, in any
> case.
>
> --
> - stephan beal
> http://wanderinghorse.net/home/stephan/
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>

Its is a bit odd to run 2 http servers (well maybe not that odd)
1) run fossil ui on port 8080
2) run apache (xampp) on port 80 for the php pages.
   use a link or a path to get de directory into the pages that apache
will serve. you could do [http://localhost/fossil/demo/my.php|php
demo].
It is the basic theme you could improve with virtual hosts so that your
development  system uses the same naming (of course you have to edit your
local hostfile )

-- 
Rene de Zwart

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-06 Thread Stephan Beal
On Tue, Apr 6, 2010 at 9:10 PM, verizon  wrote:

> From advice I got previously here is how I can access a PDF that is in the
> repository with a relative link (works both locally and in a server)
>
> [http:doc/tip/Ethernet/DOCS/npincomplete.pdf | Code Description (pdf) ]
>

That won't work in this case because...

The document i need to serve is a demo PHP page, which must be served by the
underlying web server. It uses JavaScript which requires a web server to be
able to POST messages to (it's an RPC framework, so it's all about passing
messages to/from the web server).

i was hoping i could link non-fossil'd subdirs without using absolute URLs
(including domain), but i haven't found a way to do it. They would be useful
because my public website is mirrored on my system, so i could simplify
local testing before updating the public server. But no big deal, in any
case.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-06 Thread verizon
Hi,

From advice I got previously here is how I can access a PDF that is in 
the repository with a relative link (works both locally and in a server)

[http:doc/tip/Ethernet/DOCS/npincomplete.pdf | Code Description 
(pdf) ]

Your link should work similarly.  The file is in /Ethernet/DOCS/npincomplete.pdf 

--jim


On 6 Apr, 2010, at 14:41, Stephan Beal wrote:

> Hi, all!
> 
> i'm developing a JavaScript RPC toolkit which i am of course hosting in 
> Fossil:
> 
> 
> http://fossil.wanderinghorse.net/repos/JSONMessage/
> 
> that's all fine and good, but then i wanted to add a demo page. That entailed 
> adding a subdir under my project and leading the user there, of course. But 
> fossil defeats me...
> 
> If i have a link which simply says [demo/] then it treats it as a wiki page. 
> If i use [./demo] then when running in "fossil ui" mode fossil cannot find 
> the "demo" command (of course). i haven't tried [./demo] on the remote server 
> (CGI-based), but i suspect it _might_ work. i've tried using an A HREF 
> directly, but in local server mode that also gets intercepted.
> 
> My only working is using an absolute URL. The only problem with that is, if i 
> follow the link while using "fossil ui" then i end up on my remote server, 
> getting a different (probably older) copy of the demo.
> 
> i'm looking for a linking solution which will work both in local server modes 
> and CGI.
> 
> :-?
> 
> PS: this is not a big deal, just a minor annoyance. i'm not going to propose 
> any new features to support it if this cannot be done already.
> 
> -- 
> - stephan beal
> http://wanderinghorse.net/home/stephan/
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] can this be done in fossil: hyperlinking to subdir of fossil repo

2010-04-06 Thread Stephan Beal
Hi, all!

i'm developing a JavaScript RPC toolkit which i am of course hosting in
Fossil:


http://fossil.wanderinghorse.net/repos/JSONMessage/

that's all fine and good, but then i wanted to add a demo page. That
entailed adding a subdir under my project and leading the user there, of
course. But fossil defeats me...

If i have a link which simply says [demo/] then it treats it as a wiki page.
If i use [./demo] then when running in "fossil ui" mode fossil cannot find
the "demo" command (of course). i haven't tried [./demo] on the remote
server (CGI-based), but i suspect it _might_ work. i've tried using an A
HREF directly, but in local server mode that also gets intercepted.

My only working is using an absolute URL. The only problem with that is, if
i follow the link while using "fossil ui" then i end up on my remote server,
getting a different (probably older) copy of the demo.

i'm looking for a linking solution which will work both in local server
modes and CGI.

:-?

PS: this is not a big deal, just a minor annoyance. i'm not going to propose
any new features to support it if this cannot be done already.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users