- Subject: Re: reloading the buffer after commit in svn.sl (patched cvs.sl)
- From: "G. Milde" <g.milde@xxxxxx>
- Date: Thu, 23 Nov 2006 12:56:38 +0100
On 22.11.06, Joachim Schmitz wrote:
> hi,
> the patched cvs.sl does not reload the committed file into the buffer.
> Since the commit changes the $Id $ lines, I always get the file changed
> on disk message. Could someone show me the right way to solve this ?
The patch below should solve this problem. It adds a call to reload_buffer()
to the cvs_commit_buffer() function. (if the commit is done via a file
listing, reload should be done manually or added to the respective function
as well).
A fairly sophisticated version of reload_buffer() is provided by
http://jedmodes.sf.net/mode/bufutils/
* erase and "refill" current buffer -> keeps undo history and blocal
variables
* save the current position (line, col) and go there after reloading
* resets the "changed on disk" flag
* doesnot check if the version on disk is newer: can be used for both,
updating to a version changed on disk and reverting to the last saved
version.
* Will overwrite your changes without further asking!!! (should I
change this?)
--- /home/milde/.jed/contribs/cvs-orig.sl 2006-11-23 12:43:36.000000000 +0100
+++ /home/milde/.jed/contribs/cvs.sl 2006-11-23 12:43:00.000000000 +0100
@@ -146,7 +146,12 @@
% * Rough SVN port
%
-_debug_info=1; _traceback=1; _slangtrace=1;
+% Uncomment these for bug hunting
+% _debug_info=1; _traceback=1; _slangtrace=1;
+
+% requirements
+autoload("reload_buffer", "bufutils"); % jedmodes.sf.net/mode/bufutils/
+
%% Variables %{{{
if (_featurep(__FILE__)) {
@@ -492,6 +497,7 @@
variable message = read_mini("Committing '" + file +"'. Log message: ", "", "");
do_cvs([ "commit", "-m", message, file ], dir, 1, 1);
+ reload_buffer();
}
%}}}
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2006 date index]
[2006 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]