Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37434112
en ru br
Репозитории ALT
S:1.11.23-alt9
5.1: 1.11.23-alt3.M50P.1
4.1: 1.11.22-alt3
4.0: 1.11.22-alt2
+updates:1.11.22-alt2
3.0: 1.11.20-alt1
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: cvs

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: cvs-1.11.10-deb-fast-edit.patch
Скачать


diff -uprk.orig cvs-1.11.10.orig/src/logmsg.c cvs-1.11.10/src/logmsg.c
--- cvs-1.11.10.orig/src/logmsg.c	2003-06-23 17:52:18 +0400
+++ cvs-1.11.10/src/logmsg.c	2003-12-15 03:55:04 +0300
@@ -11,6 +11,9 @@
 #include "cvs.h"
 #include "getline.h"
 
+#include <sys/types.h>
+#include <utime.h>
+
 static int find_type PROTO((Node * p, void *closure));
 static int fmt_proc PROTO((Node * p, void *closure));
 static int logfile_write PROTO((char *repository, char *filter,
@@ -193,6 +196,7 @@ do_editor (dir, messagep, repository, ch
     size_t line_chars_allocated;
     char *fname;
     struct stat pre_stbuf, post_stbuf;
+    struct utimbuf pre_utbuf;
     int retcode = 0;
 
 #ifdef CLIENT_SUPPORT
@@ -286,6 +290,13 @@ do_editor (dir, messagep, repository, ch
     if ( CVS_STAT (fname, &pre_stbuf) == -1)
 	pre_stbuf.st_mtime = 0;
 
+  /* Decrease the file's modification time by 1 second so we
+   * to find out if the `editor' program changes it in less than 1 second.
+   */
+    pre_utbuf.actime = &pre_stbuf.st_mtime;
+    pre_utbuf.modtime = &pre_stbuf.st_ctime - 1;
+    utime (fname, &pre_utbuf);
+
     if (editinfo_editor)
 	free (editinfo_editor);
     editinfo_editor = (char *) NULL;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin