monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Issues with mtn commit and the latest net.venge.mo


From: Tero Koskinen
Subject: Re: [Monotone-devel] Issues with mtn commit and the latest net.venge.monotone head
Date: Sat, 7 Mar 2009 07:21:18 +0200

On Fri, 6 Mar 2009 20:30:59 -0700 Derek Scherger wrote:
> On Fri, Mar 6, 2009 at 2:10 PM, Tero Koskinen <address@hidden> wrote:
> 
> > Hi,
> >
> > "mtn commit" seems to be broken in revision
> > d24b59732a5b3293592457cba013c8f8b716a875.
> >
> > I found out two problems
> >
> > Problem 1)
> >
> > When doing "mtn commit" I get:
> > $ mtn ci
> > mtn.real: beginning commit on branch 'fi.iki.tkoskine.ahven'
> > mtn.real: warning: [string "<std hooks>"]:314: bad argument #1 to 'find'
> > (string expected, got nil)
> > mtn.real: misuse: edit of log message failed
> > $
> >
> 
> Downthread your monotone version reports that std_hooks.lua is patched, any
> chance there's a stray change in there causing the problem?

It shouldn't, difference is following:
#
# old_revision [04766db8e363880fd1d50692d793661d9f4fdcf4]
#
# patch "merge_content.hh"
#  from [c3dc50ac9bad4488b4583c84551f3c6302763a64]
#    to [186e799f5cd9787817b23672daccb03a7f380a95]
# 
# patch "std_hooks.lua"
#  from [47f92f3269c99464106e72b9f3839027c3eacce1]
#    to [1f0c51a34f82a4c686e50ca0faa01f22f328065f]
#
============================================================
--- merge_content.hh    c3dc50ac9bad4488b4583c84551f3c6302763a64
+++ merge_content.hh    186e799f5cd9787817b23672daccb03a7f380a95
@@ -13,6 +13,7 @@
 
 #include "vocab.hh"
 #include "rev_types.hh"
+#include "paths.hh"
 
 class database;
 class lua_hooks;
============================================================
--- std_hooks.lua       47f92f3269c99464106e72b9f3839027c3eacce1
+++ std_hooks.lua       1f0c51a34f82a4c686e50ca0faa01f22f328065f
@@ -439,11 +439,19 @@ mergers.tortoise = {
    wanted = function () return true end
 }
 
+function get_gnu_diff()
+   return "gdiff"
+end
+
+function get_gnu_diff3()
+   return "gdiff3"
+end
+
 mergers.vim = {
    cmd = function (tbl)
       function execute_diff3(mine, yours, out)
      local diff3_args = {
-        "diff3",
+        get_gnu_diff3(),
         "--merge",
         "--easy-only",
      }
@@ -498,7 +506,7 @@ mergers.vim = {
    end ,
    available =
       function ()
-     return program_exists_in_path("diff3") and
+     return program_exists_in_path(get_gnu_diff3()) and
             (program_exists_in_path("vim") or
         program_exists_in_path("gvim"))
       end ,


> > Problem 2)
> >
> > When doing "mtn commit -m 'long message'" I get unknown path errors:
> > $ mtn commit -m 'Increase version to 1.7'
> > mtn.real: warning: restriction includes unknown path '1.7'
> > mtn.real: warning: restriction includes unknown path 'to'
> > mtn.real: warning: restriction includes unknown path 'version'
> > mtn.real: misuse: 3 unknown paths
> > $
> 
> 
> This looks like a shell problem. I don't know how monotone can cause a
> quoted string to become separated. Is "mtn" a script that doesn't have the
> proper "$@" or whatever with required quotes to represent arguments? I'm
> wondering about a script because you say "mtn" and it reports "mtn.real" ?
> Also, what shell are you running?
> 
> Looking at it again I wonder if your first problem has the same cause?

Oops, this was my own fault. My 'mtn' is a shell wrapper around real mtn
command to get library paths right. I wasn't using double quotes around 
address@hidden

Following script solved the -m option problem:
#!/bin/sh
LD_LIBRARY_PATH=$HOME/libraries/botan-18/lib mtn.real "$@"
# end of script

-- 
Tero Koskinen <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]