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 14:59:28 +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?

Following one line change seems to fix commit for me:
#
# old_revision [add275e5fdb0824361d4a2fa15049281e7ada52e]
#
# patch "std_hooks.lua"
#  from [e649c4ba5118116f0f6db708bbcd02b08f67d8f2]
#    to [d8c06cff3368b388f6b6268227e1432a94a3ed6f]
#
============================================================
--- std_hooks.lua       e649c4ba5118116f0f6db708bbcd02b08f67d8f2
+++ std_hooks.lua       d8c06cff3368b388f6b6268227e1432a94a3ed6f
@@ -313,7 +313,7 @@ function edit_comment(basetext, user_log
    -- anything more complicated than a single word with no metacharacters.
    -- This, unfortunately, means we have to quote the file argument.
 
-   if (not string.find(editor, "[^%w_.+-]")) then
+   if (not string.find(exe, "[^%w_.+-]")) then
       -- safe to call spawn directly
       if (execute(exe, tname) ~= 0) then
         io.write(string.format(gettext("Error running editor '%s' "..


Variable editor is unset if environment variable EDITOR does not exist.
On the other hand, variable exe should always have some value.

-- 
Tero Koskinen <address@hidden>




reply via email to

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