On the mailing list, Alexander Belchenko wrote:
> [Providing feedback on the Explorer status bar] requires even
> more tighter integration between qbzr and explorer, but this is
> already in my todo list. Also it may mean we need to drop support
> for bzr-gtk widgets in explorer.
This should be doable in a not-too-difficult, UNIX-idiomatic, and
backward-compatible way: define an optional environment variable, e.g.
BZR_STATUS_MESSAGE_FD, which, if defined, tells the subprocess to
write a one-line status message, suitable for display in
explorer's status area, to the specified file descriptor.
- qbzr: If BZR_STATUS_MESSAGE_FD is defined, write a status
message to the specified file descriptor
- explorer:
- Before forking, open another pipe
- Pass the file-descriptor number of its write end as BZR_STATUS_MESSAGE_FD
- When the subprocess returns, copy the first line from the
pipe to the status area
- If the pipe doesn't provide any data, create a generic
message based on the subprocess's exit status
- If the user clicks through on the status area, display
whatever was read from stdout and/or stderr
- In all of this, of course, do the appropriate deadlock-prevention magic
- bzr-gtk (and any other widget provider that isn't
status-aware) will ignore BZR_STATUS_MESSAGE_FD, and so
(unless it's totally perverse) it won't write anything to the
pipe; thus, explorer won't read anything, and so will produce
the generic message
This mechanism could be made extensible by labelling the status
line in some way, thus leaving the door open for other,
differently labelled sections, and giving the environment
variable a suitably generic name. (Would the low-level bits of
the smart-server protocol be appropriate, with different
primitives of course, or would that be overkill?)
I don't know how to do all this on Windows, but I presume it's
doable, using whatever mechanism is already used to emulate the
relevant bits of the UNIX API.
On the mailing list, Alexander Belchenko wrote:
> [Providing feedback on the Explorer status bar] requires even
> more tighter integration between qbzr and explorer, but this is
> already in my todo list. Also it may mean we need to drop support
> for bzr-gtk widgets in explorer.
This should be doable in a not-too-difficult, UNIX-idiomatic, and MESSAGE_ FD, which, if defined, tells the subprocess to
backward-compatible way: define an optional environment variable, e.g.
BZR_STATUS_
write a one-line status message, suitable for display in
explorer's status area, to the specified file descriptor.
- qbzr: If BZR_STATUS_ MESSAGE_ FD is defined, write a status
message to the specified file descriptor
- explorer:
BZR_STATUS_ MESSAGE_ FD
deadlock- prevention magic
- Before forking, open another pipe
- Pass the file-descriptor number of its write end as
- When the subprocess returns, copy the first line from the
pipe to the status area
- If the pipe doesn't provide any data, create a generic
message based on the subprocess's exit status
- If the user clicks through on the status area, display
whatever was read from stdout and/or stderr
- In all of this, of course, do the appropriate
- bzr-gtk (and any other widget provider that isn't MESSAGE_ FD, and so
status-aware) will ignore BZR_STATUS_
(unless it's totally perverse) it won't write anything to the
pipe; thus, explorer won't read anything, and so will produce
the generic message
This mechanism could be made extensible by labelling the status
line in some way, thus leaving the door open for other,
differently labelled sections, and giving the environment
variable a suitably generic name. (Would the low-level bits of
the smart-server protocol be appropriate, with different
primitives of course, or would that be overkill?)
I don't know how to do all this on Windows, but I presume it's
doable, using whatever mechanism is already used to emulate the
relevant bits of the UNIX API.
- Eric