[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] making opendiff wait
From: |
William Uther |
Subject: |
Re: [Monotone-devel] making opendiff wait |
Date: |
Thu, 22 Feb 2007 08:53:43 +1100 |
On 21/02/2007, at 9:03 PM, Nathaniel Smith wrote:
On Wed, Feb 21, 2007 at 05:14:12PM +1100, William Uther wrote:
Hi all,
At the moment mtn can use the 'opendiff' command on a mac for
merging. By default this doesn't wait till you're done merging
before it continues, so you have a special hook that asks for <enter>
before continuing. This is annoying. :)
It turns out that opendiff does wait if you pipe its output
somewhere (although it waits until quit, not until window close).
This is a little script I use:
#! /bin/zsh
`/usr/bin/opendiff address@hidden
Wait, _what_? That makes like.... no sense whatsoever.
I know. I found it on the web. I assumed there was an isatty check
there somewhere.
opendiff | more
also works.
If you google for opendiff, basically every hit is someone trying to
figure out how to achieve this result, and I'm told that apple's
internal bug tracker has had a bug open requesting this for 6+ years.
How the heck did you discover this?
Web search. There was a blog at MIT that had it.
What's the actual detail needed to trigger this, do you think?
isatty(1) returning false?
That's what I thought. What is weird is that I tried to make this
work using my shiny new spawn_pipe() lua hook, and couldn't.
Does it give a useful exit code?
Haven't checked. I suspect the `` are going to cause problems for
the exit code. Might want to try the |more trick instead.
What happens if the user already has FileMerge.app running? I assume
they have to exit out of it entirely? (Not that this is likely to
come up much.)
Again, haven't tried. Given that you have to exit entirely for the
normal use, I assume the same holds true if it was already open.
BTW, if you run 'strings opendiff' you'll see a '-wait' option. If
you use it, then opendiff waits. The problem is that it never
unwaits :). Something strange is going on.
Be well,
Will :-}