RE: FW: Patch for preserving edit on files when checking out

2005-04-20 Thread Darren Bowles
Okay, i'll update the test script tomorrow and look over the documentation as 
well.

Ta,
Darren.


-Original Message-
From: Derek Price [mailto:[EMAIL PROTECTED]
Sent: Tue 4/19/2005 6:13 PM
To: Darren Bowles
Cc: bug-cvs@gnu.org
Subject: Re: FW: Patch for preserving edit on files when checking out
 
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Darren Bowles wrote:

 I've had a few people asking me for my patch, so maybe the previous
 one never made it to the list; I know I had attachment problems
 before.

 Please find enclosed the patch (as text) from the previous email.


Patches will not be accepted without accompanying test cases (when
possible) and documentation (when necessary).  Also, please send
patches in universal  (`cvs diff -u') or context (`cvs diff -c')
format.  I prefer the universal format, myself.  Please see the
`HACKING', `DEVEL-CVS', and `TESTS' files distributed with CVS for more.

I don't think documentation will be necessary in your case, since I
think you are making `cvs edit' behave as a naive user would expect it
to and I don't believe the current (broken) behavior is documented,
but it might be worth giving the `cvs edit' sections a once-over to
verify that the broken behavior is not documented.  The source for the
manual is in doc/cvs.texinfo.

Tests will be necessary for this patch.  We need something that
demonstrates the problem when run with a current CVS and passes with
your patched version.  Tests should be added to the src/sanity.sh
script.  Please see the `TESTS' file distributed with CVS for more.

Cheers,

Derek

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCZTxKLD1OTBfyMaQRAldAAJ48k+5K4yaz3p5q47hCrN8wMC368ACgkcoD
97p3dln/2MhPaijxn1Ntq74=
=zeqm
-END PGP SIGNATURE-



___
Bug-cvs mailing list
Bug-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-cvs


RE: FW: Patch for preserving edit on files when checking out

2005-04-20 Thread Darren Bowles
Please find attached my cvs patch, with test added to sanity.sh.

As requested, the format is cvs diff -u

Ta,
Darren

Index: config.h.in
===
RCS file: /cvs/ccvs/config.h.in,v
retrieving revision 1.164
diff -u -r1.164 config.h.in
--- config.h.in 23 Mar 2005 00:04:26 -  1.164
+++ config.h.in 20 Apr 2005 13:43:42 -
@@ -735,6 +735,10 @@
 /* Define to 1 if you have the `__secure_getenv' function. */
 #undef HAVE___SECURE_GETENV
 
+/* Define if you want CVS to be able to preserve your edits on multiple
+   checkouts. */
+#undef KEEP_EDITING
+
 #if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
 # define ISSLASH(C) ((C) == '/' || (C) == '\\')
 #else
Index: configure
===
RCS file: /cvs/ccvs/configure,v
retrieving revision 1.382
diff -u -r1.382 configure
--- configure   18 Apr 2005 19:44:37 -  1.382
+++ configure   20 Apr 2005 13:44:23 -
@@ -37912,8 +37912,21 @@
   conftest$ac_exeext conftest.$ac_ext
 fi
 
+# --enable-keep-editing Allow a user to keep their file edits, when
checking
+# out another copy of a repository.
 
+# 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;
 
 # What remote shell transport should our client cvs default to using?
 
Index: configure.in
===
RCS file: /cvs/ccvs/configure.in,v
retrieving revision 1.349
diff -u -r1.349 configure.in
--- configure.in18 Apr 2005 19:44:37 -  1.349
+++ configure.in20 Apr 2005 13:44:25 -
@@ -1362,6 +1362,136 @@
 dnl
 dnl end --enable-lock-compatibility
 dnl
+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
+
+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
+
+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
+
+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
+
+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 

Re: FW: Patch for preserving edit on files when checking out

2005-04-19 Thread Ian Abbott
On 18/04/05 14:54, Darren Bowles wrote:
I've had a few people asking me for my patch, so maybe the previous one
never made it to the list;  I know I had attachment problems before.
Please find enclosed the patch (as text) from the previous email.
Hi Darren,
Possibly the attachments get stripped from the mail archive?  I'm trying 
that out for myself now!

Your resent patch came out kind of funky, with '' quoting, 
line-wrapping and MIME quoted-printabling, so I've attached a cleaned-up 
version of your previous message (with the patch) for people to use.  It 
might get stripped from the archive though... My email program 
(Thunderbird) is pretty useless for sending patches in the main body of 
the email, so it will have to be an attachment.

Ian.
--
-=( Ian Abbott @ MEV Ltd.E-mail: [EMAIL PROTECTED])=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
Bug-cvs mailing list
Bug-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-cvs

Re: FW: Patch for preserving edit on files when checking out

2005-04-19 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Darren Bowles wrote:

 I've had a few people asking me for my patch, so maybe the previous
 one never made it to the list; I know I had attachment problems
 before.

 Please find enclosed the patch (as text) from the previous email.


Patches will not be accepted without accompanying test cases (when
possible) and documentation (when necessary).  Also, please send
patches in universal  (`cvs diff -u') or context (`cvs diff -c')
format.  I prefer the universal format, myself.  Please see the
`HACKING', `DEVEL-CVS', and `TESTS' files distributed with CVS for more.

I don't think documentation will be necessary in your case, since I
think you are making `cvs edit' behave as a naive user would expect it
to and I don't believe the current (broken) behavior is documented,
but it might be worth giving the `cvs edit' sections a once-over to
verify that the broken behavior is not documented.  The source for the
manual is in doc/cvs.texinfo.

Tests will be necessary for this patch.  We need something that
demonstrates the problem when run with a current CVS and passes with
your patched version.  Tests should be added to the src/sanity.sh
script.  Please see the `TESTS' file distributed with CVS for more.

Cheers,

Derek

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCZTxKLD1OTBfyMaQRAldAAJ48k+5K4yaz3p5q47hCrN8wMC368ACgkcoD
97p3dln/2MhPaijxn1Ntq74=
=zeqm
-END PGP SIGNATURE-




___
Bug-cvs mailing list
Bug-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-cvs


Re: FW: Patch for preserving edit on files when checking out

2005-04-19 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ian Abbott wrote:

 On 18/04/05 14:54, Darren Bowles wrote:

 I've had a few people asking me for my patch, so maybe the
 previous one never made it to the list; I know I had attachment
 problems before.

 Please find enclosed the patch (as text) from the previous email.



 Hi Darren,

 Possibly the attachments get stripped from the mail archive? I'm
 trying that out for myself now!


Ian, text-only attachments should come through all right, but it may
depend on your mail client.  Thunderbird works all right for me when
sending patches.  Specifically, the following MIME types *are not*
stripped by the list's content filter: multipart/mixed,
multipart/alternative,  text/plain.

Your attachment of a cleaned-up version of Darren's message didn't
come through, though.  Maybe Thunderbird doesn't attach messages as
one of the text types?

Cheers,

Derek
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCZT6pLD1OTBfyMaQRAq7mAJwKZqBBWxYYo4zR5sTUQGwWwTk2wQCgkMah
i9GodrURQWYRzo3xsXoe694=
=BOmt
-END PGP SIGNATURE-




___
Bug-cvs mailing list
Bug-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-cvs


Re: FW: Patch for preserving edit on files when checking out

2005-04-19 Thread Ian Abbott
On 19/04/05 18:13, Ian Abbott wrote:
On 18/04/05 14:54, Darren Bowles wrote:
I've had a few people asking me for my patch, so maybe the previous one
never made it to the list;  I know I had attachment problems before.
Possibly the attachments get stripped from the mail archive?  I'm trying 
that out for myself now!
Doh!  The attachment got stripped by MailMan/MimeDel.  My earlier test 
message with a small attachment got through intact, though.  Maybe 
attachments above a certian size are getting filtered out?

--
-=( Ian Abbott @ MEV Ltd.E-mail: [EMAIL PROTECTED])=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
Bug-cvs mailing list
Bug-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-cvs


Re: FW: Patch for preserving edit on files when checking out

2005-04-19 Thread Ian Abbott
Hi Derek,
On 19/04/05 18:23, you wrote:
Ian Abbott wrote:
Possibly the attachments get stripped from the mail archive? I'm
trying that out for myself now!
Ian, text-only attachments should come through all right, but it may
depend on your mail client.  Thunderbird works all right for me when
sending patches.  Specifically, the following MIME types *are not*
stripped by the list's content filter: multipart/mixed,
multipart/alternative,  text/plain.
Your attachment of a cleaned-up version of Darren's message didn't
come through, though.  Maybe Thunderbird doesn't attach messages as
one of the text types?
I've looked in my sent mail folder and Thunderbird gave it a MIME type 
of text/x-diff, possibly based on the file extension .patch.  I'll 
try renaming it to .txt and see if that works.

--
-=( Ian Abbott @ MEV Ltd.E-mail: [EMAIL PROTECTED])=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
__ 
From:   Darren Bowles  
Sent:   22 March 2005 14:17
To: 'bug-cvs@gnu.org'
Subject:RE: Patch for preserving edit on files when checking out

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
___
Bug-cvs mailing list
Bug-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-cvs

Re: FW: Patch for preserving edit on files when checking out

2005-04-19 Thread Ian Abbott
On 19/04/05 18:29, Ian Abbott wrote:
Hi Derek,
On 19/04/05 18:23, you wrote:
Your attachment of a cleaned-up version of Darren's message didn't
come through, though.  Maybe Thunderbird doesn't attach messages as
one of the text types?
I've looked in my sent mail folder and Thunderbird gave it a MIME type 
of text/x-diff, possibly based on the file extension .patch.  I'll 
try renaming it to .txt and see if that works.
Renaming the attachment let it pass through okay.
Would it be possible to add text/x-diff to the allowed MIME types? 
Maybe text/x-patch as well, since I've seen that before.

--
-=( Ian Abbott @ MEV Ltd.E-mail: [EMAIL PROTECTED])=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
Bug-cvs mailing list
Bug-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-cvs


Re: FW: Patch for preserving edit on files when checking out

2005-04-19 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ian Abbott wrote:

 I've looked in my sent mail folder and Thunderbird gave it a MIME
 type of text/x-diff, possibly based on the file extension
 .patch. I'll try renaming it to .txt and see if that works.


Seems reasonable enough.  Done.

Cheers,

Derek
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCZUezLD1OTBfyMaQRAtx/AJ4hATpTgCvsFbyETvYBMvX35dhEqACfSFm3
VQvvHjLM3DhgmEmYCQsDBFE=
=dEac
-END PGP SIGNATURE-




___
Bug-cvs mailing list
Bug-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-cvs


Re: FW: Patch for preserving edit on files when checking out

2005-04-19 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Derek Price wrote:

 possible) and documentation (when necessary). Also, please send
 patches in universal (`cvs diff -u')


I've been corrected - that should be unified, as opposed to
universal, diff format, above.  But it's still `cvs diff -u' to
create a unified diff, and that's still the format I prefer.  It's
easier to read.  :)

Cheers,

Derek
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCZUjMLD1OTBfyMaQRAv6FAJ45Hus0S0hZGLDH2Qb5qI4ZL9ocUgCgoWXg
/cLbtu4fj6ZMcz0tpuzERjA=
=Fuhu
-END PGP SIGNATURE-




___
Bug-cvs mailing list
Bug-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-cvs


Re: FW: Patch for preserving edit on files when checking out

2005-04-19 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Derek Price wrote:

 Ian Abbott wrote:

 I've looked in my sent mail folder and Thunderbird gave it a MIME
 type of text/x-diff, possibly based on the file extension
 .patch. I'll try renaming it to .txt and see if that works.

 Seems reasonable enough. Done.


I used the wrong quote above.  Should have been:


Ian Abbott wrote:

 Would it be possible to add text/x-diff to the allowed MIME
 types? Maybe text/x-patch as well, since I've seen that before.


Seems reasonable enough.  Done.  :)

Cheers,

Derek
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCZUlbLD1OTBfyMaQRAivvAJoCTYvOmYtuxLEQM0NmOF7bA34foACeOwtE
SB+KS7lDHzwwKqGlzVwGtZ8=
=LNC7
-END PGP SIGNATURE-




___
Bug-cvs mailing list
Bug-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-cvs