monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] mtn_automate usage


From: Thomas Keller
Subject: [Monotone-devel] mtn_automate usage
Date: Wed, 14 Jul 2010 23:46:41 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5

While I worked on nvm.validate-changes I had the idea to use
mtn_automate() in my pre-commit test hook to only scan the diffed source
part for CRLFs (see the other mail), but this usage is currently
prevented as we only allow mtn_automate() being called from
register_command().

Now this code was implemented about three years ago from William Uther
(I don't know if he is still around), so I wonder why he decided to
restrict this in that way. One sure thing is that we of course want to
prevent endless recursion, i.e. calling an automate command which calls
a hook which calls the automate command again, but I think this could be
prevented successfully, while still allowing mtn_automate for other use
cases.

Is there anything I haven't thought of? Is option handling a problem?
Probably, since f.e. workspace options could be written earlier than
expected, e.g. execute a workspace command with a new branch name, call
a automate command which also needs the workspace and executes
successfully, options are written back to _MTN/options, the normal
control flow of the calling workspace command fails, user expects
_MTN/options to be untouched...

Anything else?

Thomas.

-- 
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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