[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Patch for preserving edit on files when checking out
From: |
Darren Bowles |
Subject: |
RE: Patch for preserving edit on files when checking out |
Date: |
Tue, 22 Mar 2005 14:17:15 -0000 |
> Please find attached my CVS patch for preserving editor flag upon
> multiple checkouts.
>
> The issue is : development projects frequently have developers working
> on more than 1 branch at the same time. For instance, they may be
> working on forthcoming development work, in addition to fixing live
> support issues.
>
> The current code will overwrite a users edit flag if they check out
> the source code again. There is a comment in update.c that suggests
> it would be better to do this instead of by user, by work area; which
> makes more sense.
>
> When I get a spare couple of days, I will code / implement this
> feature as it will be very useful.
>
> This patch adds a new ./configure option called --enable-keep-editing
> which will preserve a users edit upon checkout.
>
> I grant permission to distribute this patch under
> the terms of the GNU Public License
>
> << File: cvs.patch >>
>
Index: config.h.in
===================================================================
RCS file: /cvs/ccvs/config.h.in,v
retrieving revision 1.163
diff -r1.163 config.h.in
739a740,743
> /* Define if you want CVS to be able to preserve your edits on
multiple
> checkouts. */
> #undef KEEP_EDITING
>
Index: configure
===================================================================
RCS file: /cvs/ccvs/configure,v
retrieving revision 1.376
diff -r1.376 configure
963a964,965
> --enable-keep-editing Allow a user to keep their file edits, when
checking
> out another copy of a repository.
37970a37973,37984
> # check whether --enable-keep-editing was given
> if test "${enable_keep_editing+set}" = set; then
> enableval="$enable_keep_editing"
> else
> enable_keep_editing=no
> fi;
>
> if test no != "$enable_keep_editing"; then
> cat >>confdefs.h <<\_ACEOF
> #define KEEP_EDITING 1
> _ACEOF
> fi;
Index: configure.in
===================================================================
RCS file: /cvs/ccvs/configure.in,v
retrieving revision 1.345
diff -r1.345 configure.in
1364a1365,1390
> dnl
> dnl begin --enable-keep-editing
> dnl
>
> dnl
> dnl If you are using the edit facility and you checkout in more than
> dnl one directory, you will lose you edit. This option enables you to
> dnl keep editing.
> dnl
>
> AC_ARG_ENABLE(
> [keep-editing],
> AC_HELP_STRING(
> [--enable-keep-editing],
> [Include code for preserving edits on multiple checkouts
(default)]), ,
> [enable_keep_editing=no])
>
> if test yes = "$enable_keep_editing"; then
> AC_DEFINE(
> [KEEP_EDITING], [1],
> [Define if you want CVS to be able to preserve your edits on
multiple checkouts.])
>
> dnl
> dnl end --enable-keep-editing
> dnl
>
Index: src/update.c
===================================================================
RCS file: /cvs/ccvs/src/update.c,v
retrieving revision 1.252
diff -r1.252 update.c
1356a1357,1358
> /* If we don't want to keep edits from a previous checkout */
> #ifndef KEEP_EDITING
1358c1360
<
---
> #endif