9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] fossil consoles
@ 2003-03-14 18:49 Fco.J.Ballesteros
  2003-03-14 19:41 ` Russ Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Fco.J.Ballesteros @ 2003-03-14 18:49 UTC (permalink / raw)
  To: 9fans

Is there any plan to split the output queue into several ones so that each
console has its own one?

I was trying to get a script done to advance the epoch and, in the
process, trying to get something like kfscmd done.  I'd just like to
send a command to a fossil srv file and receive the command output
(without the output from other consoles merged).

I was about going to do it but thought that perhaps it'd be better to ask
here. Maybe there's a better way to do this in fossil. I still think in
kfs terms.

thanks a lot



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] fossil consoles
  2003-03-14 18:49 [9fans] fossil consoles Fco.J.Ballesteros
@ 2003-03-14 19:41 ` Russ Cox
  0 siblings, 0 replies; 5+ messages in thread
From: Russ Cox @ 2003-03-14 19:41 UTC (permalink / raw)
  To: 9fans

I'm torn about the console.  I like the fact that
everyone sees everyone else, but I also understand
that it makes programmatic access to console commands
difficult.  At the same time, I really really really
want to see the programmatic access on the main console.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] fossil consoles
  2003-03-17 13:47 rog
  2003-03-17 14:02 ` Fco.J.Ballesteros
@ 2003-03-17 14:02 ` Fco.J.Ballesteros
  1 sibling, 0 replies; 5+ messages in thread
From: Fco.J.Ballesteros @ 2003-03-17 14:02 UTC (permalink / raw)
  To: 9fans

It was the output in `broadcast mode' to all consoles what was
bothering me. But since it seems to be a feature and not a bug,
I just tried this script which words well enough for controlling
purposes. The script depends on a /sys/log/fossil file that gets
a copy of the fossil console (eg. you have a
cat /srv/fscmd >/sys/log/fossil).

#!/bin/rc
# usage: fscmd `fossilcons(8) command'

if (! test -e /srv/fscmd){
	echo '/srv/fscmd does not exist' >[1=2]
	exit 'srv'
}

oldsz=`{ls -l /sys/log/fossil | awk -F' ' '{print $6}'}
oldsz=`{echo $oldsz '+' `{echo $* | wc -c} | hoc}

echo $* >>/srv/fscmd

{ dd -if /sys/log/fossil -bs 1 -skip $oldsz >[2] /dev/null ;
  echo
}  | grep -v '^[a-z]*:'




>> I'm torn about the console.  I like the fact that
>> everyone sees everyone else, but I also understand
>> that it makes programmatic access to console commands
>> difficult.  At the same time, I really really really
>> want to see the programmatic access on the main console.
> 
> what about letting fossil provide a 'ctl' tree, e.g.
> 
> 	mount /srv/fossil /n/fossilctl ctl
> 
> which would provide access to fossil metainformation
> (e.g. usage info) and process control requests?
> it could also provide controlled access to the fossil console.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] fossil consoles
  2003-03-17 13:47 rog
@ 2003-03-17 14:02 ` Fco.J.Ballesteros
  2003-03-17 14:02 ` Fco.J.Ballesteros
  1 sibling, 0 replies; 5+ messages in thread
From: Fco.J.Ballesteros @ 2003-03-17 14:02 UTC (permalink / raw)
  To: 9fans

It was the output in `broadcast mode' to all consoles what was
bothering me. But since it seems to be a feature and not a bug,
I just tried this script which words well enough for controlling
purposes. The script depends on a /sys/log/fossil file that gets
a copy of the fossil console (eg. you have a
cat /srv/fscmd >/sys/log/fossil).

#!/bin/rc
# usage: fscmd `fossilcons(8) command'

if (! test -e /srv/fscmd){
	echo '/srv/fscmd does not exist' >[1=2]
	exit 'srv'
}

oldsz=`{ls -l /sys/log/fossil | awk -F' ' '{print $6}'}
oldsz=`{echo $oldsz '+' `{echo $* | wc -c} | hoc}

echo $* >>/srv/fscmd

{ dd -if /sys/log/fossil -bs 1 -skip $oldsz >[2] /dev/null ;
  echo
}  | grep -v '^[a-z]*:'




>> I'm torn about the console.  I like the fact that
>> everyone sees everyone else, but I also understand
>> that it makes programmatic access to console commands
>> difficult.  At the same time, I really really really
>> want to see the programmatic access on the main console.
> 
> what about letting fossil provide a 'ctl' tree, e.g.
> 
> 	mount /srv/fossil /n/fossilctl ctl
> 
> which would provide access to fossil metainformation
> (e.g. usage info) and process control requests?
> it could also provide controlled access to the fossil console.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] fossil consoles
@ 2003-03-17 13:47 rog
  2003-03-17 14:02 ` Fco.J.Ballesteros
  2003-03-17 14:02 ` Fco.J.Ballesteros
  0 siblings, 2 replies; 5+ messages in thread
From: rog @ 2003-03-17 13:47 UTC (permalink / raw)
  To: 9fans

> I'm torn about the console.  I like the fact that
> everyone sees everyone else, but I also understand
> that it makes programmatic access to console commands
> difficult.  At the same time, I really really really
> want to see the programmatic access on the main console.

what about letting fossil provide a 'ctl' tree, e.g.

	mount /srv/fossil /n/fossilctl ctl

which would provide access to fossil metainformation
(e.g. usage info) and process control requests?
it could also provide controlled access to the fossil console.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-03-17 14:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-14 18:49 [9fans] fossil consoles Fco.J.Ballesteros
2003-03-14 19:41 ` Russ Cox
2003-03-17 13:47 rog
2003-03-17 14:02 ` Fco.J.Ballesteros
2003-03-17 14:02 ` Fco.J.Ballesteros

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).