Re: A note on modern git plus ancient meld ("wrong number of arguments")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 9, 2012 at 11:17 AM, Jeff Epler <jepler@xxxxxxxxxxxxxx> wrote:
> I note this just in case it helps someone else track down a similar
> problem, not because I think any change needs to be made to git, as a
> version of meld new enough to not be affected by this problem is 5 years
> old.
>
> At $DAYJOB, I recently encountered a problem after upgrading from (don't
> laugh) git 1.7.1 to 1.7.8.3: one developer stated that meld failed to
> run, instead displaying the error 'Wrong number of arguments (Got 5)'.
>
> We determined that this user was running a very old version of meld
> (1.1.1) from his home directory, as opposed to the also very old system
> version of meld (1.1.5).  It turns out that the check added in
>    f61bd9c mergetools/meld: Use '--output' when available
> fails on meld 1.1.1, leading git to incorrectly believe the --output
> flag is supporrted:
>    $ meld-1.1.1 --output /dev/null --help >/dev/null 2>&1; echo $?
>    0   # i.e., detected as supported
> The test as written gives the correct ("not supported") result with meld
> 1.1.5:
>    $ meld-1.1.5 --output /dev/null --help >/dev/null 2>&1; echo $?
>    2   # i.e., detected as supported
>
> so if you encounter the message 'Wrong number of arguments (Got 5)' from
> meld, then check whether you have an ancient version of meld.  If for
> some reason you can't upgrade to at least 1.1.5, maybe you'd find the
> following configuration flags useful:
>    [merge]
>        tool = ancientmeld
>    [mergetool "ancientmeld"]
>        cmd = meld-1.1.1 \"$LOCAL\" \"$MERGED\" \"$REMOTE\"

We originally used the --output test so that we wouldn't have to check
for a specific version.  Does your meld support `meld --version`, and
what does it output?

I'm thinking that maybe we should just try and parse the version
number since it seems like we cannot depend on ancient meld's return
code.

Thanks Jeff.  I'll see what we can do about it.
-- 
David
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]