Daniel Stenberg wrote:
>A few inlined questions follow.
>I've implemented a couple of things that can be considered issue #604 stuff
>or closely related. My hope is that we can concentrate on this CVS-mimic
>behavior first, and then possibly start adding more fancy features when this
>is done and committed.
>It currenly does this:
> * If no commit message is given, it fires up an editor for you. The editor
> is picked from environment variables, and they're tried in this order:
> SVN_EDITOR, EDITOR, VISUAL and if none of them are set, notepad.exe
> is used on win32 machines and /bin/vi on all other.
I'd suggest autoconfing for the location of vi, and setting that up as a
define in svn_local_config.h; then your code becomes:
editor = getenv("EDITOR");
editor = SVN_DEFAULT_EDITOR_NAME;
All Win32 specifics stay in svn_private_config.hw. I'd also suggest
looking into .svnrc for the editor name.
>* The editor loads a temporary file and is supposed to save a commit
> message. The temporary file will contain a short message saying that all
> lines starting with 'SVN:' will be stripped. Below that, a 'svn status'
> output of the given commit targets will be included, 'SVN:' prefixed.
> * If the edited file has the same size and modification time after the
> editor is closed, a prompt will appear asking if the user wants to:
> abort, continue or edit the message again. abort means aborting the
> commit, continue means commit with empty message and edit will fire up
> the editor again.
> * A saved message gets loaded into memory and all SVN:-lines are cut off.
> The temporary file is then removed.
> * The actual commit is performed.
> * If the commit returns not successful, a new temporary file is created and
> the previously entered commit message is store in the file. A message is
> presented to stdout about this. People who write long commit messages
> before failed commits will appreciate this! ;-)
> (Regarding temporary files: they're currently stored in the
> "$root/.svn/tmp/" dir, $root being the root dir of the targets that are
> about to get committed. svn_wc_create_tmp_file() didn't fit me since it
> opens the temp file DELONCLOSE, which none of the above two temp files
> should do. Could we add a boolean or flags argument to that function? I
> could only fine one other user of it.)
>Currently the "$EDITOR code" does not deal with error codes properly (or
>fully), mostly because of the situation I discussed in a previous mail that
>the client's error codes are polluting the library error code include file. I
>would like permission to commit this first, and then attack the cmdline
>client's error code situation viciously! :-)
>I have tested the code, but it needs more eyes and more testing.
Brane Čibej <brane_at_xbc.nu> http://www.xbc.nu/brane/
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Sat Oct 21 14:36:59 2006