[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] Hooks
From: |
Daniel Carrera |
Subject: |
[Monotone-devel] Hooks |
Date: |
Fri, 10 Oct 2008 16:34:16 +0200 |
User-agent: |
Thunderbird 2.0.0.17 (Macintosh/20080914) |
Is it possible to write a hook that implements Ludovic's solution to the
"undo a commit" problem? :
1) Edit _MTN/revisions and change the value of old_revision to the
previous revision.
2) Run 'mtn db kill_rev_locally'
I was thinking that an easy way to implement an "mtn uncommit" command
might be through a Lua hook. Here is a quick sketch:
function uncommit()
-- Find the id of the revision before this one.
-- Find the _MTN directory.
-- read_contents_of_file(_MTN/revision)
-- Edit the old_revision line.
-- Run db kill_rev_locally
end
I cannot figure out how to do these things (or if it's possible) from
the Hook documentation. I don't know if the Hook reference is the entire
API or if Monotone offers other features to Hook writers.
Daniel.
- [Monotone-devel] Hooks,
Daniel Carrera <=
- [Monotone-devel] Re: Hooks, Bruce Stephens, 2008/10/10
- Re: [Monotone-devel] Re: Hooks, Daniel Carrera, 2008/10/10
- Re: [Monotone-devel] Re: Hooks, Thomas Keller, 2008/10/10
- Re: [Monotone-devel] Re: Hooks, Daniel Carrera, 2008/10/10
- Re: [Monotone-devel] Re: Hooks, Thomas Keller, 2008/10/10
- Re: [Monotone-devel] Re: Hooks, Daniel Carrera, 2008/10/10
- Re: [Monotone-devel] Re: Hooks, Thomas Keller, 2008/10/10
- Re: [Monotone-devel] Re: Hooks, Daniel Carrera, 2008/10/10
- Re: [Monotone-devel] Re: Hooks, Thomas Keller, 2008/10/10
- Re: [Monotone-devel] Re: Hooks, Daniel Carrera, 2008/10/10