[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

issue #604 report

From: Daniel Stenberg <daniel_at_haxx.se>
Date: 2002-01-24 14:07:30 CET

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.

 * 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.

-- 
      Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:58 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.