Re: [fossil-users] Fossil as DLL?

2012-11-27 Thread Gilles
On Sun, 25 Nov 2012 13:31:32 -0500, Tomek Kott
tkott.li...@outlook.com wrote:
You might want to take a look at the work done for SharpFossil:
http://repository.mobile-developers.de/cgi-bin/ikoch/sharpfossil/index

Although it hasn't been worked on in a while, I think some of the commands
you are looking for have been implemented as a wrapper useable by C# programs. 

Thanks, I'll check it out.

___
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] Fossil as DLL?

2012-11-26 Thread Nico Williams
IIUC the main reason to want a DLL instead of having to spawn a new
process for every operation is iOS.  I hear that the dearth of
excellent git (and other) SCM clients for iOS has to do with the
constrained nature of the run-time environment.
___
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] Fossil as DLL?

2012-11-26 Thread Lluís Batlle i Rossell
On Mon, Nov 26, 2012 at 01:52:53PM -0600, Nico Williams wrote:
 IIUC the main reason to want a DLL instead of having to spawn a new
 process for every operation is iOS.  I hear that the dearth of
 excellent git (and other) SCM clients for iOS has to do with the
 constrained nature of the run-time environment.

fossil uses fork() quite enough, and its memory management depends on that, for
what I understand.
___
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] Fossil as DLL?

2012-11-26 Thread Richard Hipp
On Mon, Nov 26, 2012 at 2:59 PM, Lluís Batlle i Rossell vi...@viric.namewrote:


 fossil uses fork() quite enough, and its memory management depends on
 that, for
 what I understand.


The fossil ui and fossil server commands use fork() on unix.  But
fork() is not available on windows so we have the winhttp.c source file to
work around that limitation.

So Fossil does not depend on fork().  But the implementation of Fossil
would be simplified if fork() were universally available.



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




-- 
D. Richard Hipp
d...@sqlite.org
___
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] Fossil as DLL?

2012-11-26 Thread Jan Danielsson
On 11/26/12 21:06, Richard Hipp wrote:
 fossil uses fork() quite enough, and its memory management depends on
 that, for
 what I understand.
 
 The fossil ui and fossil server commands use fork() on unix.  But
 fork() is not available on windows so we have the winhttp.c source file to
 work around that limitation.
 
 So Fossil does not depend on fork().  But the implementation of Fossil
 would be simplified if fork() were universally available.

   Oh, thanks for reminding me of something.

   When I downloaded the win32 fossil binary and installed it on a
64-bit windows, I noticed that the fossil ui won't work properly due to
that it fails to launch new processes. Running command line fossil
works, but starting new fossil processes from fossil appears to fail.

   My gut feeling is that there's a simple solution for this (other
programs must be launching new 32-bit processes from 32-bit processes in
win64, but I'm not well versed in windows, so I don't know exactly where
to look.

   Fixing it by building a 64-bit binary was trivial enough, but if we
could make the distributed binary play nice on 64-bit Windows it would
be great.

   Anyone know if there's a trivial fix?

-- 
Kind regards,
Jan Danielsson

___
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] Fossil as DLL?

2012-11-26 Thread Richard Hipp
On Mon, Nov 26, 2012 at 3:28 PM, Jan Danielsson
jan.m.daniels...@gmail.comwrote:


When I downloaded the win32 fossil binary and installed it on a
 64-bit windows, I noticed that the fossil ui won't work properly due to
 that it fails to launch new processes. Running command line fossil
 works, but starting new fossil processes from fossil appears to fail.\


My guess is that this is a $PATH problem.  It might have been fixed by this
point.  Can you try again by recompiling the latest Fossil sources from
trunk?

Failing that, can you run:

fossil test-echo hi

And tell us what you see for argv[0]?  Is what you see the complete
pathname to the correct 64-bit fossil that you are actually running?  It
should be.


-- 
D. Richard Hipp
d...@sqlite.org
___
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] Fossil as DLL?

2012-11-25 Thread Tomek Kott
Gilles,

You might want to take a look at the work done for SharpFossil: 
http://repository.mobile-developers.de/cgi-bin/ikoch/sharpfossil/index. 
Although it hasn't been worked on in a while, I think some of the commands you 
are looking for have been implemented as a wrapper useable by C# programs. 

Tomek

 To: fossil-users@lists.fossil-scm.org
 From: gilles.gana...@free.fr
 Date: Sat, 24 Nov 2012 22:40:11 +0100
 Subject: Re: [fossil-users] Fossil as DLL?
 
 On Sat, 24 Nov 2012 15:31:41 -0500, Richard Hipp
 d...@sqlite.org wrote:
 The current Fossil implementation is not appropriate for converting into a
 library due to its extensive using of global variables and due to a
 cavalier attitude toward freeing allocated memory.  Fossil is designed to
 run a single operation quickly, then quit and let the operating system
 clean up the mess.  Even commands like fossil ui operate by having the
 parent process start up a new short-lived child process to process every
 HTTP request.
 
 Thanks for the info. I'll just read the output of commands searching
 for the case insensitive y/n, and if found, let the user rewrite the
 command in case it's incomplete ((eg. commit missing a comment
 through the -m switch).
 
 This question needs to be a FAQ
 
 I logged on as anonymous/dynamic-password-on-screen (Logged in as
 anonymous), but didn't see any Edit link anywhere in the FAQ page
 so I could add this question.
 www.fossil-scm.org/index.html/doc/trunk/www/faq.wiki
 
 Thank you.
 
 ___
 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] Fossil as DLL?

2012-11-24 Thread Gilles
Hello

Unless there's a way to call fossil.exe and know  how the command
ended...

http://imageshack.us/photo/my-images/688/fossilprompt.jpg

... is there a way to recompile the Fossil source code to turn it into
a DLL* to get some feedback when calling Fossil programmatically?

Since SQLite is available as a DLL and can be called from either a CLI
application (sqlite.exe) or an application, how much work would it be
to convert its source code to a library?

Thank you.

* shared library, in *nix parlance

___
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] Fossil as DLL?

2012-11-24 Thread Richard Hipp
On Sat, Nov 24, 2012 at 3:20 PM, Gilles gilles.gana...@free.fr wrote:

 Hello

 Unless there's a way to call fossil.exe and know  how the command
 ended...

 http://imageshack.us/photo/my-images/688/fossilprompt.jpg

 ... is there a way to recompile the Fossil source code to turn it into
 a DLL* to get some feedback when calling Fossil programmatically?

 Since SQLite is available as a DLL and can be called from either a CLI
 application (sqlite.exe) or an application, how much work would it be
 to convert its source code to a library?


The current Fossil implementation is not appropriate for converting into a
library due to its extensive using of global variables and due to a
cavalier attitude toward freeing allocated memory.  Fossil is designed to
run a single operation quickly, then quit and let the operating system
clean up the mess.  Even commands like fossil ui operate by having the
parent process start up a new short-lived child process to process every
HTTP request.

This idea of starting a new process to handle each operation seems to be
seems to be unfamiliar many newer programers.  Everyone these days just
assumes that a process is long-lived and handles multiple operations.
Having a long-lived process is perhaps a good idea if you are building
massive applications using a complex framework with dozens or hundreds of
dependent libraries, since start-up costs can be expensive. But Fossil is
self-contained and has minimal start-up cost, and so kicking off a new
process to handle each operation really isn't such a bad thing.  And it
certainly makes programming easier, since you are free to hold program
state in global or static variables and you no longer have to worry so much
about leaking resources.

This question needs to be a FAQ



 Thank you.

 * shared library, in *nix parlance

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




-- 
D. Richard Hipp
d...@sqlite.org
___
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] Fossil as DLL?

2012-11-24 Thread Gilles
On Sat, 24 Nov 2012 15:31:41 -0500, Richard Hipp
d...@sqlite.org wrote:
The current Fossil implementation is not appropriate for converting into a
library due to its extensive using of global variables and due to a
cavalier attitude toward freeing allocated memory.  Fossil is designed to
run a single operation quickly, then quit and let the operating system
clean up the mess.  Even commands like fossil ui operate by having the
parent process start up a new short-lived child process to process every
HTTP request.

Thanks for the info. I'll just read the output of commands searching
for the case insensitive y/n, and if found, let the user rewrite the
command in case it's incomplete ((eg. commit missing a comment
through the -m switch).

This question needs to be a FAQ

I logged on as anonymous/dynamic-password-on-screen (Logged in as
anonymous), but didn't see any Edit link anywhere in the FAQ page
so I could add this question.
www.fossil-scm.org/index.html/doc/trunk/www/faq.wiki

Thank you.

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