Re: [fossil-users] The fossil service command
On Mon, 18 Jul 2011 23:51:11 +0300, Richard Hipp d...@sqlite.org wrote: First of all, thank you Thomas (and you Richard!) for such a nice feature. Regarding name of the command I'm agree 'service' and 'server' commands are confusing, since theya re very close by meanings. However, I don't think that 'win-serve' is OK too, because this feature will be available on Windows only, so 'win' prefix is definitely obsolete. Moreover, command names with dashes seems to be inconsistent to other fossil commands. I'm voting for name 'background'. It's the same by the meaning, but more useful than 'service' because we can use short command 'fossil ba', for example in this case. Thomas Schnurrenberger's fossil service command - for running Fossil as a windows service - is now on the trunk. But I wonder: The name of this command is very similar to fossil server and might be confusing. Do we need to change it to something more distinctive? Perhaps fossil wservice or fossil win-serve. Other ideas? -- @macacq ___ 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] The fossil service command
On 19.07.2011 06:16, Jeremy Anderson wrote: Other platforms could either re-direct it (e.g., fossil service becomes an alias for fossil server), or just print a message saying that the command is only valid for Windows operating systems. On non Windows platforms, fossil service prints the following message: The service command is platform specific and not available on this platform. HTH -- tsbg ___ 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] The fossil service command
On Tue, Jul 19, 2011 at 6:16 AM, Jeremy Anderson jere...@gmail.com wrote: I currently host fossil server as a window service via NSSM. fossil service gets my vote. simple to the point. i would argue for the win prefix because 'service' is used on other platforms as well, e.g. Solaris SMF services or Debian's service start/stop interface. Other platforms could either re-direct it (e.g., fossil service becomes an alias for fossil server), or just print a message saying that the command is only valid for Windows operating systems. Since the command could presumably only run on Windows, i would expect it to not be available on other platforms. -- - 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] The fossil service command
Why not make an option e.g. fossil server -service? -- Rene ___ 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] The fossil service command
On Tue, Jul 19, 2011 at 3:42 PM, Rene renew...@xs4all.nl wrote: Why not make an option e.g. fossil server -service? +1 :) -- - 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] The fossil service command
On 19.07.2011 15:42, Rene wrote: Why not make an option e.g. fossil server -service? because the service command consists of several sub-commands? -- tsbg ___ 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] The fossil service command
To quote Donald Knuth: the root of all evil is premature optimization. Is service really that confusing? imho service is the term that windows users would be most familiar with; perhaps it can be given a try first before being rejected as confusing. If it doesn't work out, perhaps svc is a workable alternative. Paul - Original Message - From: Richard Hipp d...@sqlite.org To: fossil-users fossil-users@lists.fossil-scm.org Sent: Monday, July 18, 2011 10:51 PM Subject: [fossil-users] The fossil service command Thomas Schnurrenberger's fossil service command - for running Fossil as a windows service - is now on the trunk. But I wonder: The name of this command is very similar to fossil server and might be confusing. Do we need to change it to something more distinctive? Perhaps fossil wservice or fossil win-serve. Other ideas? -- 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 ___ 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] The fossil service command
On 7/19/2011 11:27 AM, Paul wrote: Is service really that confusing? I'm more concerned that `fossil serv` becomes ambiguous. (fossil allows unambiguous short versions of all its commands.) -- Joshua Paine LetterBlock: Web Applications Built With Joy http://letterblock.com/ 301-576-1920 ___ 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] The fossil service command
To quote Donald Knuth: the root of all evil is premature optimization. Although the quote is nice and applicable to many situations, I think that this is absolutely not the case. The problem is not to make a type of optimization, the problem is that it is necessary to make a decision now, and do it good. At least, as good as possible. Once this name is decided, it will be nearly impossible to change it in the future. In my opinion, the name service is too generic and too windows specific. Fossil can give us a lot of services, apart from using the Windows services feature. I agree with another poster that a good solution could be to make it a subcommand of server. How many times is people going to install/uninstall the service? Something like: fossil server ?-P|--port TCPPORT? ?--service-install? ?--service-remove? ?REPOSITORY? RR 2011/7/19 Paul p...@planet.nl: To quote Donald Knuth: the root of all evil is premature optimization. Is service really that confusing? imho service is the term that windows users would be most familiar with; perhaps it can be given a try first before being rejected as confusing. If it doesn't work out, perhaps svc is a workable alternative. Paul - Original Message - From: Richard Hipp d...@sqlite.org To: fossil-users fossil-users@lists.fossil-scm.org Sent: Monday, July 18, 2011 10:51 PM Subject: [fossil-users] The fossil service command Thomas Schnurrenberger's fossil service command - for running Fossil as a windows service - is now on the trunk. But I wonder: The name of this command is very similar to fossil server and might be confusing. Do we need to change it to something more distinctive? Perhaps fossil wservice or fossil win-serve. Other ideas? -- 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 ___ 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
Re: [fossil-users] The fossil service command
On 19.07.2011 17:47, Ramon Ribó wrote: In my opinion, the name service is too generic and too windows specific. Fossil can give us a lot of services, apart from using the Windows services feature. I agree with another poster that a good solution could be to make it a subcommand of server. How many times is people going to install/uninstall the service? Something like: fossil server ?-P|--port TCPPORT? ?--service-install? ?--service-remove? ?REPOSITORY? I don't think that this a good idea because the service command has several sub-commands. It is probably better to change the command-name from service to e.g. winsvc -- tsbg ___ 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] The fossil service command
On Tue, Jul 19, 2011 at 12:12 PM, Thomas Schnurrenberger t...@gmx.net wrote: It is probably better to change the command-name from service to e.g. winsvc +1 vote for winsvc/winserve/winservice (no hyphen) ___ 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] The fossil service command
I vote for fossil server --service or something similar. -Original Message- From: Wes Freeman Sent: Tuesday, July 19, 2011 12:18 PM To: fossil-users@lists.fossil-scm.org Subject: Re: [fossil-users] The fossil service command On Tue, Jul 19, 2011 at 12:12 PM, Thomas Schnurrenberger t...@gmx.net wrote: It is probably better to change the command-name from service to e.g. winsvc +1 vote for winsvc/winserve/winservice (no hyphen) ___ 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
Re: [fossil-users] The fossil service command
fossil server ?-P|--port TCPPORT? ?--service-install? ?--service-remove? ?REPOSITORY? I don't think that this a good idea because the service command has several sub-commands. It is probably better to change the command-name from service to e.g. winsvc Althouth winsvc could also be a good solution, what other sub commands, appart from install and remove do you really need? I understand that start and stop can be managed automatically, or for special cases, from the Windows GUI directly. RR 2011/7/19 Thomas Schnurrenberger t...@gmx.net: On 19.07.2011 17:47, Ramon Ribó wrote: In my opinion, the name service is too generic and too windows specific. Fossil can give us a lot of services, apart from using the Windows services feature. I agree with another poster that a good solution could be to make it a subcommand of server. How many times is people going to install/uninstall the service? Something like: fossil server ?-P|--port TCPPORT? ?--service-install? ?--service-remove? ?REPOSITORY? I don't think that this a good idea because the service command has several sub-commands. It is probably better to change the command-name from service to e.g. winsvc -- tsbg ___ 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
Re: [fossil-users] The fossil service command
Just read through the code. Got a few comments: These errors: if( g.argc4 ) fossil_fatal(to much arguments for delete method.); if( g.argc4 ) fossil_fatal(to much arguments for show method.); if( g.argc4 ) fossil_fatal(to much arguments for create method.); if( g.argc4 ) fossil_fatal(to much arguments for start method.); if( g.argc4 ) fossil_fatal(to much arguments for stop method.); should read Too many arguments for [method_name] method. or [method_name] does not take that many arguments., if left in. However, I suggest removing them altogether and promoting all input checking to the start of the cmd_win32_service() method, because all the conditions (g.argc4) are identical. In other words, I suggest re-factoring all of these checks higher up and only doing it once, i.e., changing this block of code from: + void cmd_win32_service(void){ + int n; + const char *zMethod; + const char *zSvcName = Fossil-DSCM; /* Default service name */ + + if( g.argc3 ){ +usage(create|delete|show|start|stop ...); + } + zMethod = g.argv[2]; + n = strlen(zMethod); + if( g.argc==4 ){ +zSvcName = g.argv[3]; + } to: + if( g.argc3 || g.argc4){ +usage(create|delete|show|start|stop ...); + } + zMethod = g.argv[2]; + n = strlen(zMethod); + zSvcName = g.argv[3]; (Note: I'm assuming the usage() function somehow aborts execution when it's finished.) -jer On Mon, Jul 18, 2011 at 1:51 PM, Richard Hipp d...@sqlite.org wrote: Thomas Schnurrenberger's fossil service command - for running Fossil as a windows service - is now on the trunk. But I wonder: The name of this command is very similar to fossil server and might be confusing. Do we need to change it to something more distinctive? Perhaps fossil wservice or fossil win-serve. Other ideas? -- 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 ___ 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] The fossil service command
On 19.07.2011 18:36, Ramon Ribó wrote: Althouth winsvc could also be a good solution, what other sub commands, appart from install and remove do you really need? You don't need the service command at all. There are command line utilities and/or GUI's in the Windows OS which have the required functionality. But not every tool does everything. The fossil service command is a convenience command for Windows users who are not system administrators. It concentrates the necessary functionality where it is needed. -- tsbg ___ 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] The fossil service command
The fossil service command is a convenience command for Windows users who are not system administrators. It concentrates the necessary functionality where it is needed I agree with it. So my proposal was to add the minimal functionality to the command: fossil server --install-service fossil server --remove-service What else is really necessary? Compass Ing. y Sistemas Dr. Ramon Ribo http://www.compassis.com ram...@compassis.com c/ Tuset, 8 7-2 tel. +34 93 218 19 89 08006 Barcelona, Spainfax. +34 93 396 97 46 El 19/07/2011 21:52, Thomas Schnurrenberger t...@gmx.net escribió: On 19.07.2011 18:36, Ramon Ribó wrote: Althouth winsvc could also be a good solution, what other sub commands, appart from install and remove do you really need? You don't need the service command at all. There are command line utilities and/or GUI's in the Windows OS which have the required functionality. But not every tool does everything. The fossil service command is a convenience command for Windows users who are not system administrators. It concentrates the necessary functionality where it is needed. -- tsbg ___ 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] The fossil service command
Thomas Schnurrenberger's fossil service command - for running Fossil as a windows service - is now on the trunk. But I wonder: The name of this command is very similar to fossil server and might be confusing. Do we need to change it to something more distinctive? Perhaps fossil wservice or fossil win-serve. Other ideas? -- 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] The fossil service command
On Mon, Jul 18, 2011 at 10:51 PM, Richard Hipp d...@sqlite.org wrote: something more distinctive? Perhaps fossil wservice or fossil win-serve. Other ideas? i'd prefer win-service, but i don't use windows so i don't get a vote. or maybe: fossil M$ervice ;) -- - 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] The fossil service command
I'd say service is good. win-service may be appropriate since this command is valid only on Windows. However, I'd like to avoid use of hyphen (-) in commands. I hope this command is automatically disabled (via compiler or run-time) for non-windows platforms. - Original Message - From: Ron Wilson Sent: 07/19/11 04:03 AM To: fossil-users@lists.fossil-scm.org Subject: Re: [fossil-users] The fossil service command On Mon, Jul 18, 2011 at 4:52 PM, Stephan Beal sgb...@googlemail.com wrote: On Mon, Jul 18, 2011 at 10:51 PM, Richard Hipp d...@sqlite.org wrote: something more distinctive? Perhaps fossil wservice or fossil win-serve. Other ideas? i'd prefer win-service, but i don't use windows so i don't get a vote. win-service makes sense to me. I am in a mixed environment. or maybe: fossil M$ervice ;) *chuckle* ___ 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
Re: [fossil-users] The fossil service command
I currently host fossil server as a window service via NSSM. fossil service gets my vote. simple to the point. Other platforms could either re-direct it (e.g., fossil service becomes an alias for fossil server), or just print a message saying that the command is only valid for Windows operating systems. On Mon, Jul 18, 2011 at 8:47 PM, altufa...@mail.com wrote: I'd say service is good. win-service may be appropriate since this command is valid only on Windows. However, I'd like to avoid use of hyphen (-) in commands. I hope this command is automatically disabled (via compiler or run-time) for non-windows platforms. - Original Message - From: Ron Wilson Sent: 07/19/11 04:03 AM To: fossil-users@lists.fossil-scm.org Subject: Re: [fossil-users] The fossil service command On Mon, Jul 18, 2011 at 4:52 PM, Stephan Beal sgb...@googlemail.com wrote: On Mon, Jul 18, 2011 at 10:51 PM, Richard Hipp d...@sqlite.org wrote: something more distinctive? Perhaps fossil wservice or fossil win-serve. Other ideas? i'd prefer win-service, but i don't use windows so i don't get a vote. win-service makes sense to me. I am in a mixed environment. or maybe: fossil M$ervice ;) *chuckle* ___ 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 mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users