gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] Re: give us a hand with arch


From: Mark A. Flacy
Subject: Re: [Gnu-arch-users] Re: give us a hand with arch
Date: Sat, 27 Sep 2003 11:15:23 -0500

>>>>> "Tom" == Tom Lord <address@hidden> writes:
Tom> 
Tom>    Should having a commit-time editor mean that I can't use `commit
Tom>    -L'?  or should it mean that I have two commands: one to run when I
Tom>    want an editor and one when I don't?  Does it mean that everyone
Tom>    must have a script like walters' that tries to parse the command
Tom>    name and options?
Tom> 
Tom>    None of those options seem very user friendly to me: it's a
Tom>    legitimate observation that the handling of an editor session
Tom>    during a commit-like command involves feedback from the other
Tom>    options to commit, for example.

I'm afraid that it's unclear to me how an option to a commit-like command
is more user-friendly to a differently named commit-like command that
invokes an editor.  On second thought, don't answer that; I don't really
want to see a thread spin off on that topic.  You're the architect and
that's your decision to make.


Tom>    So it doesn't seem to ridiculous to me to add an
Tom>    `arch_ensure_log_is_ready()' function and call that in the
Tom>    `main'-like functions that implement several commands.  It will fit
Tom>    in with the existing argument processing very nicely; it has 0
Tom>    impact on any of the core functionality; it provides the desired
Tom>    features; it avoids the drawbacks illustrated by walters' script.

You could also add a pre-commit hook to ~/.arch-params/hook that checks the
return code from arch_run_hook() that allows you to return an error code that
aborts the commit operation.  Pass at least the log file name to the hook[1],
and Bob's your uncle.

(Somebody's going to want that functionality anyways.  Almost any
commercial shop will.)



Footnotes: 
[1]  It's possible that someone might want a reference to the changeset
     that is going to be committed instead.  That would have all the items
     of possible interest.

-- 
 Mark A. Flacy
 Any opinions expressed above are my own.  Any facts expressed above
 are, ummm, facts.
"If you think the problem is bad now, just wait until we've solved it."
 -- Arthur Kasspe





reply via email to

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