[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Docs and test cases for Noel's edit check patch

From: mmogilvi
Subject: Docs and test cases for Noel's edit check patch
Date: Sun, 14 Oct 2001 15:13:06 -0600 (MDT)

I have posted a new version of Yap Noel's reservations patch
on sourceforge:

It has now been fairly well tested and includes documentation and
test cases.

This patch is not against an official release of CVS.  Instead
it is against the version that can be pulled out of the main
repository with
  cvs -d :pserver:address@hidden:/cvs co \
       -D "Oct 13, 2001 23:28:20 GMT" ccvs

Other highlights:

1. If this gets integrated into official CVS, the following things
   may be needed:
   - Leave out the changes to src/version.c.
     Test case 'version-2r' will fail if you integrate these changes.
   - Remove the commented-out TODO item 180 (cvs edit should report
     current editors).  (This patch implements this feature.)
   - Possibly leave out sockPlayer/cvsPlayer related files and
     the edit-check-cp test cases that use them.  (More about this

2. Some (not all) of the test cases use a new tool "sockPlayer".
   It is a generic socket communications record/playback tool that I
   wrote in order to simulate old versions of the CVS client/server
     If the tool has not been compiled successfully
   (in testTools directory), issues a warning that it isn't
   available and then skips those tests.
     [Actually, uses a wrapper script around sockPlayer
   called cvsPlayer.]
     There are a few reasons you might not want to include the sockPlayer
      - It might be too strict about changes in the protocol.  Some
        minor changes won't break compatibility with older versions
        of CVS.
      - It is currently in ANSI C, not K&R.  If truly
        desired, this could be changed, but its been a long time since
        I saw a compiler that doesn't handle ANSI.
      - It makes parts of dependent dependent on a non-standard
        tool.  Presumably sockPlayer.c and it's build instructions could
        be embedded into, but that sounds extreme...
      - In terms of the reservations patch, no changes to the
        client/server protocol were actually made: It just makes
        minor changes to the way it is used.
   Despite these weaknesses, I think it might be worth considering using
   something like sockPlayer to gaurd against breaking client/server
   cross-version compatibility.

3. Internal changes:
    - The original patch used to use a seperate connection to the
      server to check for edits, and a full round trip for every
      file to check.  Now it uses the same connection for
      checking edits and grabbing new ones, and it uses a single
      round trip to check edits for all files.
    - Fixed a problem with duplicate warnings for a non-existent file
      that an existing test case file.

4. Unrelated bug I found and fixed while preparing this patch:
    "cvs release -d" was loosing track of what directory it was
   in, causing it to sometimes mess up the current direotory's
   CVS/Entries file.  I fixed it by adding a hook to client.c to
   let it know when the current directory is about to be changed
   out from under it, and cleaned up the way release.c was
   uneditting files.

5. Unrelated bug I have *not* fixed:
   Under the following conditions, CVS will hang in some kind
   of deadlock about the time it is supposed be closing the connection:
    - Running client/server CVS.
    - Client is CVS 1.11 (or other official release).
    - Server is from development '-D "Oct 13, 2001 23:28:20 GMT"'
      (or anything from the past couple of months, I think)
    - You have compression turned on (-z6 global option).

I've tried to split the patch into sections that could be manually
seperated with a minimum of effort:
A. The main patch.
B. version.c
C. sockPlayer.c and related changes. (If this is left out, you will
   need to manually remove the corresponding edit-check-cpr tests
   in, which aren't seperated out.)

Matthew Ogilvie                address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]