Merge from vendor branch OPENSSL:
[dragonfly.git] / contrib / cvs-1.12.9 / TODO
1 The "TODO" file!                              -*-Indented-Text-*-
2
3 22. Catch signals for cleanup when "add"ing files.
4
5 24. Insist on a log message.
6     (If done, this should be configurable via commitinfo or some new
7     config file -kingdon, Jun 1995).
8
9 30. Add "rdiff" & "rtag" program options to the modules database.  These
10     commands seem hard to use since these commands deal directly with the
11     RCS ,v files.  (perhaps should think a little harder about what this is
12     trying to accomplish and what the best way is -kingdon, Jul 1997).
13
14 31. Think hard about ^C recovery.
15     One particular issue: RCS removes the ,foo.c, file on ^C and CVS
16     doesn't.
17
18 38. Think hard about using RCS state information to allow one to checkin
19     a new vendor release without having it be accessed until it has been
20     integrated into the local changes.
21
22 39. Think about a version of "cvs update -j" which remembers what from
23     that other branch is already merged.  This has pitfalls--it could
24     easily lead to invisible state which could confuse users very
25     rapidly--but having to create a tag or some such mechanism to keep
26     track of what has been merged is a pain.  Take a look at PRCS 1.2.
27     PRCS 1.0 was particularly bad the way it handled the "invisible
28     state", but 1.2 is significantly better.
29
30 49. cvs xxx commands should be able to deal with files in other
31     directories.  I want to do a cvs add foo/bar.c.
32     [[ most commands now use the generic recursion processor, but not all;
33     this note is left here to remind me to fix the others ]]
34
35 52. SCCS has a feature that I would *love* to see in CVS, as it is very
36     useful.  One may make a private copy of SCCS suid to a particular user,
37     so other users in the authentication list may check files in and out of
38     a project directory without mucking about with groups.  Is there any
39     plan to provide a similar functionality to CVS?  Our site (and, I'd
40     imagine, many other sites with large user bases) has decided against
41     having the user-groups feature of unix available to the users, due to
42     perceived administrative, technical and performance headaches.  A tool
43     such as CVS with features that provide group-like functionality would
44     be a huge help.
45
46 62. Consider using revision controlled files and directories to handle the
47     new module format -- consider a cvs command front-end to
48     add/delete/modify module contents, maybe.
49
50 63. The "import" and vendor support commands (co -j) need to be documented
51     better.
52
53 66. Length of the CVS temporary files must be limited to 14 characters for
54     System-V stupid support.  As well as the length on the CVS.adm files.
55
56 72. Consider re-design of the module -t options to use the file system more
57     intuitively.
58
59 73. Consider an option (in .cvsrc?) to automatically add files that are new
60     and specified to commit.
61
62 79. Might be nice to have some sort of interface to Sun's Translucent
63     (?) File System and tagged revisions.
64
65 82. Maybe the import stuff should allow an arbitrary revision to be
66     specified.
67
68 84. Improve the documentation about administration of the repository and
69     how to add/remove files and the use of symbolic links.
70
71 85. Make symbolic links a valid thing to put under version control.
72     Perhaps use one of the tag fields in the RCS file?  Note that we
73     can only support symlinks that are relative and within the scope of
74     the sources being controlled.
75
76 92. Look into this:
77         After a bit of soul searching via dbx, I realized my sin was that I'd
78         specified "echo" as the program to call from loginfo. The commit
79         procedure worked fine till it hit my echo, then silently aborted
80         leaving the lockfiles intact. Since I needn't use the loginfo
81         facility, I simply removed those commands and it all works.
82
83 93. Need to think hard about release and development environments.  Think
84     about execsets as well.
85
86 98. If diff3 bombs out (too many differences) cvs then thinks that the file
87     has been updated and is OK to be commited even though the file 
88     has not yet been merged.
89
90 100. Checked out files should have revision control support.  Maybe.
91
92 102. Perhaps directory modes should be propagated on all import check-ins.
93      Not necessarily uid/gid changes.
94
95 103. setuid/setgid on files is suspect.
96
97 104. cvs should recover nicely on unreadable files/directories.
98
99 105. cvs should have administrative tools to allow for changing permissions
100      and modes and what not.  In particular, this would make cvs a
101      more attractive alternative to rdist.
102
103 107. It should be possible to specify a list of symbolic revisions to
104      checkout such that the list is processed in reverse order looking for
105      matches within the RCS file for the symbolic revision.  If there is
106      not a match, the next symbolic rev on the list is checked, and so on,
107      until all symbolic revs are exhausted.  This would allow one to, say,
108      checkout "4.0" + "4.0.3" + "4.0.3Patch1" + "4.0.3Patch2" to get the
109      most recent 4.x stuff.  This is usually handled by just specifying the
110      right release_tag, but most people forget to do this.
111
112 108. If someone creates a whole new directory (i.e. adds it to the cvs
113      repository) and you happen to have a directory in your source farm by
114      the same name, when you do your cvs update -d it SILENTLY does
115      *nothing* to that directory.  At least, I think it was silent;
116      certainly, it did *not* abort my cvs update, as it would have if the
117      same thing had happened with a file instead of a directory.
118
119 109. I had gotten pieces of the sys directory in the past but not a
120      complete tree.  I just did something like:
121
122         cvs get *
123
124      Where sys was in * and got the message
125
126         cvs get: Executing 'sys/tools/make_links sys'
127         sh: sys/tools/make_links: not found
128
129      I suspect this is because I didn't have the file in question,
130      but I do not understand how I could fool it into getting an
131      error.  I think a later cvs get sys seemed to work so perhaps
132      something is amiss in handling multiple arguments to cvs get?
133
134 113. The "cvs update" command should tee its output to a log file in ".".
135      (why?  What is wrong with piping stdout to "tee"? -kingdon, Jun 1995)
136
137 119. When importing a directory tree that is under SCCS/RCS control,
138      consider an option to have import checkout the SCCS/RCS files if
139      necessary.  (This is if someone wants to import something which
140      is in RCS or SCCS without preserving the history, but makes sure
141      they do get the latest versions.  It isn't clear to me how useful
142      that is -kingdon, June 1996).
143
144 122. If Name_Repository fails, it currently causes CVS to die completely.  It
145      should instead return NULL and have the caller do something reasonable
146      (???  -what is reasonable?  I'm not sure there is a real problem here.
147      -kingdon, June 1996).
148
149 123. Add a flag to import to not build vendor branches for local code.
150      (See `importb' tests in src/sanity.sh for more details).
151
152 124. Anyway, I thought you might want to add something like the following
153      to the cvs man pages:
154
155      BUGS
156         The sum of the sizes of a module key and its contents are
157         limited.  See ndbm(3).
158
159 126. Do an analysis to see if CVS is forgetting to close file descriptors.
160      Especially when committing many files (more than the open file limit
161      for the particular UNIX).
162
163 127. Look at *info files; they should all be quiet if the files are not
164      there.  Should be able to point at a RCS directory and go.
165
166 130. cvs diff with no -r arguments does not need to look up the current RCS
167      version number since it only cares about what's in the Entries file.
168      This should make it much faster.
169
170      It should ParseEntries itself and access the entries list much like
171      Version_TS does (sticky tags and sticky options may need to be
172      supported here as well).  Then it should only diff the things that
173      have the wrong time stamp (the ones that look modified).
174
175 134. Make a statement about using hard NFS mounts to your source
176      repository.  Look into checking NULL fgets() returns with ferror() to
177      see if an error had occurred.  (we should be checking for errors, quite
178      aside from NFS issues -kingdon, June 1996).
179
180 137. Some sites might want CVS to fsync() the RCS ,v file to protect
181      against nasty hardware errors.  There is a slight performance hit with
182      doing so, though, so it should be configurable in the .cvsrc file.
183      Also, along with this, we should look at the places where CVS itself
184      could be a little more synchronous so as not to lose data.
185      [[ I've done some of this, but it could use much more ]]
186
187 138. Some people have suggested that CVS use a VPATH-like environment
188      variable to limit the amount of sources that need to be duplicated for
189      sites with giant source trees and no disk space.
190
191 141. Import should accept modules as its directory argument.  If we're
192      going to implement this, we should think hard about how modules
193      might be expanded and how to handle those cases.
194
195 143. Update the documentation to show that the source repository is
196      something far away from the files that you work on.  (People who
197      come from an RCS background are used to their `repository' being
198      _very_ close to their working directory.)
199
200 144. Have cvs checkout look for the environment variable CVSPREFIX
201      (or CVSMODPREFIX or some such).  If it's set, then when looking
202      up an alias in the modules database, first look it up with the
203      value of CVSPREFIX attached, and then look for the alias itself.
204      This would be useful when you have several projects in a single
205      repository.  You could have aliases abc_src and xyz_src and
206      tell people working on project abc to put "setenv CVSPREFIX abc_"
207      in their .cshrc file (or equivalent for other shells).
208      Then they could do "cvs co src" to get a copy of their src
209      directory, not xyz's.  (This should create a directory called
210      src, not abc_src.)
211
212 145. After you create revision 1.1.1.1 in the previous scenario, if
213      you do "cvs update -r1 filename" you get revision 1.1, not
214      1.1.1.1.  It would be nice to get the later revision.  Again,
215      this restriction comes from RCS and is probably hard to
216      change in CVS.  Sigh.
217
218      |"cvs update -r1 filename" does not tell RCS to follow any branches.  CVS
219      |tries to be consistent with RCS in this fashion, so I would not change
220      |this.  Within CVS we do have the flexibility of extending things, like
221      |making a revision of the form "-r1HEAD" find the most recent revision
222      |(branch or not) with a "1." prefix in the RCS file.  This would get what
223      |you want maybe.
224       
225      This would be very useful.  Though I would prefer an option
226      such as "-v1" rather than "-r1HEAD".  This option might be
227      used quite often.
228
229 146. The merging of files should be controlled via a hook so that programs
230      other than "rcsmerge" can be used, like Sun's filemerge or emacs's
231      emerge.el.  (but be careful in making this work client/server--it means
232      doing the interactive merging at the end after the server is done).
233      (probably best is to have CVS do the non-interactive part and
234      tell the user about where the files are (.#foo.c.working and
235      .#foo.c.1.5 or whatever), so they can do the interactive part at
236      that point -kingdon, June 1996).
237
238 149. Maybe there should be an option to cvs admin that allows a user to
239      change the Repository/Root file with some degree of error checking?
240      Something like "cvs admin reposmv /old/path /new/pretty/path".  Before
241      it does the replace it check to see that the files
242      /new/pretty/path/<dir>/<files> exist.
243
244      The obvious cases are where one moves the repository to another
245      machine or directory.  But there are other cases, like where the
246      user might want to change from :pserver: to :ext:, use a different
247      server (if there are two server machines which share the
248      repository using a networked file system), etc.
249
250      The status quo is a bit of a mess (as of, say, CVS 1.9).  It is
251      that the -d global option has two moderately different uses.  One
252      is to use a totally different repository (in which case we'd
253      probably want to give an error if it disagreed with CVS/Root, as
254      CVS 1.8 and earlier did).  The other is the "reposmv"
255      functionality above (in which the two repositories really are the
256      same, and we want to update the CVS/Root files).  In CVS 1.9 and
257      1.10, -d rewrites the CVS/Root file (but not in subdirectories).
258      This behavior was not particularly popular and has been since
259      reverted.
260
261      This whole area is a rather bad pile of individual decisions which
262      accumulated over time, some of them probably bad decisions with
263      hindsight.  But we didn't get into this mess overnight, and we're
264      not going to get out of it overnight (that is, we need to come up
265      with a replacement behavior, document what parts of the status
266      quo are deprecated, probably circulate some unofficial patches, &c).
267
268      (this item originally added 2 Feb 1992 but revised since).
269
270 150. I have a customer request for a way to specify log message per
271      file, non-interactively before the commit, such that a single, fully
272      recursive commit prompts for one commit message, and concatenates the
273      per file messages for each file.  In short, one commit, one editor
274      session, log messages allowed to vary across files within the commit.
275      Also, the per file messages should be allowed to be written when the
276      files are changed, which may predate the commit considerably.
277
278      A new command seems appropriate for this.  The state can be saved in the
279      CVS directory.  I.e.,
280
281         % cvs message foo.c
282         Enter log message for foo.c
283         >> fixed an uninitialized variable
284         >> ^D
285
286      The text is saved as CVS/foo.c,m (or some such name) and commit
287      is modified to append (prepend?) the text (if found) to the log
288      message specified at commit time.  Easy enough.  (having cvs
289      commit be non-interactive takes care of various issues like
290      whether to connect to the server before or after prompting for a
291      message (see comment in commit.c at call to start_server).  Also
292      would clean up the kludge for what to do with the message from
293      do_editor if the up-to-date check fails (see commit.c client code).
294
295      I'm not sure about the part above about having commit prompt
296      for an overall message--part of the point is having commit
297      non-interactive and somehow combining messages seems like (excess?)
298      hair.
299
300      Would be nice to do this so it allows users more flexibility in
301      specifying messages per-directory ("cvs message -l") or per-tree
302      ("cvs message") or per-file ("cvs message foo.c"), and fixes the
303      incompatibility between client/server (per-tree) and
304      non-client/server (per-directory).
305
306      A few interesting issues with this: (1) if you do a cvs update or
307      some other operation which changes the working directory, do you
308      need to run "cvs message" again (it would, of course, bring up
309      the old message which you could accept)?  Probably yes, after all
310      merging in some conflicts might change the situation.  (2) How do
311      you change the stored messages if you change your mind before the
312      commit (probably run "cvs message" again, as hinted in (1))?
313
314 151. Also, is there a flag I am missing that allows replacing Ulrtx_Build
315      by Ultrix_build?  I.E. I would like a tag replacement to be a one step
316      operation rather than a two step "cvs rtag -r Ulrtx_Build Ultrix_Build"
317      followed by "cvs rtag -d Ulrtx_Build"
318
319 152. The "cvs -n" option does not work as one would expect for all the
320      commands.  In particular, for "commit" and "import", where one would
321      also like to see what it would do, without actually doing anything.
322
323 153. There should be some command (maybe I just haven't figured out
324      which one...) to import a source directory which is already
325      RCS-administered without losing all prior RCS gathered data.
326      Thus, it would have to examine the RCS files and choose a
327      starting version and branch higher than previous ones used.
328      (Check out rcs-to-cvs and see if it addresses this issue.)
329
330 154. When committing the modules file, a pre-commit check should be done to
331      verify the validity of the new modules file before allowing it to be
332      committed.
333
334 155. The options for "cvs history" are mutually exclusive, even though
335      useful queries can be done if they are not, as in specifying both
336      a module and a tag.  A workaround is to specify the module, then
337      run the output through grep to only display lines that begin with
338      T, which are tag lines.  (Better perhaps if we redesign the whole
339      "history" business -- check out doc/cvs.texinfo for the entire
340      rant.)
341
342 156. Also, how hard would it be to allow continuation lines in the
343      {commit,rcs,log}info files? It would probably be useful with all of
344      the various flags that are now available, or if somebody has a lot of
345      files to put into a module.
346
347 158. If I do a recursive commit and find that the same RCS file is checked
348      out (and modified!) in two different places within my checked-out
349      files (but within the realm of a single "commit"), CVS will commit the
350      first change, then overwrite that change with the second change.  We
351      should catch this (typically unusual) case and issue an appropriate
352      diagnostic and die.
353
354 160. The checks that the commit command does should be extended to make
355      sure that the revision that we will lock is not already locked by
356      someone else.  Maybe it should also lock the new revision if the old
357      revision was already locked by the user as well, thus moving the lock
358      forward after the commit.
359
360 163. The rtag/tag commands should have an option that removes the specified
361      tag from any file that is in the attic.  This allows one to re-use a
362      tag (like "Mon", "Tue", ...) all the time and still have it tag the
363      real main-line code.
364
365 165. The "import" command will create RCS files automatically, but will
366      screw-up when trying to create long file names on short file name
367      file systems.  Perhaps import should be a bit more cautious.
368
369 166. There really needs to be a "Getting Started" document which describes
370      some of the new CVS philosophies.  Folks coming straight from SCCS or
371      RCS might be confused by "cvs import".  Also need to explain:
372                 - How one might setup their $CVSROOT
373                 - What all the tags mean in an "import" command
374                 - Tags are important; revision numbers are not
375
376 170. Is there an "info" file that can be invoked when a file is checked out, or
377      updated ?  What I want to do is to advise users, particularly novices, of
378      the state of their working source whenever they check something out, as
379      a sanity check.
380  
381      For example, I've written a perl script which tells you what branch you're
382      on, if any.  Hopefully this will help guard against mistaken checkins to
383      the trunk, or to the wrong branch.  I suppose I can do this in
384      "commitinfo", but it'd be nice to advise people before they edit their
385      files.
386   
387      It would also be nice if there was some sort of "verboseness" switch to
388      the checkout and update commands that could turn this invocation of the
389      script off, for mature users.
390
391 173. Need generic date-on-branch handling.  Currently, many commands
392      allow both -r and -D, but that's problematic for commands like diff
393      that interpret that as two revisions rather than a single revision.
394      Checkout and update -j takes tag:date which is probably a better
395      solution overall.
396
397 174. I would like to see "cvs release" modified so that it only removes files
398      which are known to CVS - all the files in the repository, plus those which
399      are listed in .cvsignore.  This way, if you do leave something valuable in
400      a source tree you can "cvs release -d" the tree and your non-CVS goodies
401      are still there.  If a user is going to leave non-CVS files in their source
402      trees, they really should have to clean them up by hand.
403
404 175. And, in the feature request department, I'd dearly love a command-line
405      interface to adding a new module to the CVSROOT/modules file.
406
407 176. If you use the -i flag in the modules file, you can control access
408      to source code; this is a Good Thing under certain circumstances. I
409      just had a nasty thought, and on experiment discovered that the
410      filter specified by -i is _not_ run before a cvs admin command; as
411      this allows a user to go behind cvs's back and delete information
412      (cvs admin -o1.4 file) this seems like a serious problem.
413
414 177. We've got some external vendor source that sits under a source code
415      hierarchy, and when we do a cvs update, it gets wiped out because
416      its tag is different from the "main" distribution. I've tried to
417      use "-I" to ignore the directory, as well as .cvsignore, but this
418      doesn't work.
419
420 179. "cvs admin" does not log its actions with loginfo, nor does it check
421      whether the action is allowed with commitinfo.  It should.
422
423 180. "cvs edit" should show you who is already editing the files,
424      probably (that is, do "cvs editors" before executing, or some
425      similar result).  (But watch out for what happens if the network
426      is down!).
427
428 182.  There should be a way to show log entries corresponding to
429 changes from tag "foo" to tag "bar".  "cvs log -rfoo:bar" doesn't cut
430 it, because it erroneously shows the changes associated with the
431 change from the revision before foo to foo.  I'm not sure that is ever
432 a useful or logical behavior ("cvs diff -r foo -r bar" gets this
433 right), but is compatibility an issue?  See
434 http://www.cyclic.com/cvs/unoff-log.txt for an unofficial patch.
435
436 183.  "cvs status" should report on Entries.Static flag and CVS/Tag (how?
437 maybe a "cvs status -d" to give directory status?).  There should also
438 be more documentation of how these get set and how/when to re-set them.
439
440 184.  Would be nice to implement the FreeBSD MD5-based password hash
441 algorithm in pserver.  For more info see "6.1. DES, MD5, and Crypt" in
442 the FreeBSD Handbook, and src/lib/libcrypt/crypt.c in the FreeBSD
443 sources.  Certainly in the context of non-unix servers this algorithm
444 makes more sense than the traditional unix crypt() algorithm, which
445 suffers from export control problems.
446
447 185.  A frequent complaint is that keyword expansion causes conflicts
448 when merging from one branch to another.  The first step is
449 documenting CVS's existing features in this area--what happens with
450 various -k options in various places?  The second step is thinking
451 about whether there should be some new feature and if so how it should
452 be designed.  For example, here is one thought:
453
454     rcs' co command needs a new -k option.  The new option should expand
455     $Log entries without expanding $Revision entries.  This would
456     allow cvs to use rcsmerge in such a way that joining branches into
457     main lines would neither generate extra collisions on revisions nor
458     drop log lines.
459
460 The details of this are out of date (CVS no longer invokes "co", and
461 any changes in this area would be done by bypassing RCS rather than
462 modifying it), but even as to the general idea, I don't have a clear
463 idea about whether it would be good (see what I mean about the need
464 for better documentation?  I work on CVS full-time, and even I don't
465 understand the state of the art on this subject).
466
467 186.  There is a frequent discussion of multisite features.
468
469 * There may be some overlap with the client/server CVS, which is good
470 especially when there is a single developer at each location.  But by
471 "multisite" I mean something in which each site is more autonomous, to
472 one extent or another.
473
474 * Vendor branches are the closest thing that CVS currently has for
475 multisite features.  They have fixable drawbacks (such as poor
476 handling of added and removed files), and more fundamental drawbacks
477 (when you import a vendor branch, you are importing a set of files,
478 not importing any knowledge of their version history outside the
479 current repository).
480
481 * One approach would be to require checkins (or other modifications to
482 the repository) to succeed at a write quorum of sites (51%) before
483 they are allowed to complete.  To work well, the network should be
484 reliable enough that one can typically get to that many sites.  When a
485 server which has been out of touch reconnects, it would want to update
486 its data before doing anything else.  Any of the servers can service
487 all requests locally, except perhaps for a check that they are
488 up-to-date.  The way this differs from a run-of-the-mill distributed
489 database is that if one only allows reversible operations via this
490 mechanism (exclude "cvs admin -o", "cvs tag -d", &c), then each site
491 can back up the others, such that failures at one site, including
492 something like deleting all the sources, can be recovered from.  Thus
493 the sites need not trust each other as much as for many shared
494 databases, and the system may be resilient to many types of
495 organizational failures.  Sometimes I call this design the
496 "CVScluster" design.
497
498 * Another approach is a master/slave one.  Checkins happen at the
499 master site, and slave sites need to check whether their local
500 repository is up to date before relying on its information.
501
502 * Another approach is to have each site own a particular branch.  This
503 one is the most tolerant of flaky networks; if checkins happen at each
504 site independently there is no particular problem.  The big question
505 is whether merges happen only manually, as with existing CVS branches,
506 or whether there is a feature whereby there are circumstances in which
507 merges from one branch to the other happen automatically (for example,
508 the case in which the branches have not diverged).  This might be a
509 legitimate question to ask even quite aside from multisite features.
510
511 187.  Might want to separate out usage error messages and help
512 messages.  The problem now is that if you specify an invalid option,
513 for example, the error message is lost among all the help text.  In
514 the new regime, the error message would be followed by a one-line
515 message directing people to the appropriate help option ("cvs -H
516 <command>" or "cvs --help-commands" or whatever, according to the
517 situation).  I'm not sure whether this change would be controversial
518 (as defined in HACKING), so there might be a need for further
519 discussion or other actions other than just coding.
520
521 188.  Option parsing and .cvsrc has at least one notable limitation.
522 If you want to set a global option only for some CVS commands, there
523 is no way to do it (for example, if one wants to set -q only for
524 "rdiff").  I am told that the "popt" package from RPM
525 (http://www.rpm.org) could solve this and other problems (for example,
526 if the syntax of option stuff in .cvsrc is similar to RPM, that would
527 be great from a user point of view).  It would at least be worth a
528 look (it also provides a cleaner API than getopt_long).
529
530 Another issue which may or may not be related is the issue of
531 overriding .cvsrc from the command line.  The cleanest solution might
532 be to have options in mutually exclusive sets (-l/-R being a current
533 example, but --foo/--no-foo is a better way to name such options).  Or
534 perhaps there is some better solution.
535
536 189.  Renaming files and directories is a frequently discussed topic.
537
538 Some of the problems with the status quo:
539
540 a.  "cvs annotate" cannot operate on both the old and new files in a
541 single run.  You need to run it twice, once for the new name and once
542 for the old name.
543
544 b.  "cvs diff" (or "cvs diff -N") shows a rename as a removal of the
545 old file and an addition of the new one.  Some people would like to
546 see the differences between the file contents (but then how would we
547 indicate the fact that the file has been renamed?  Certainly the
548 notion that "patch(1)" has of renames is as a removal and addition).
549
550 c.  "cvs log" should be able to show the changes between two
551 tags/dates, even in the presence of adds/removes/renames (I'm not sure
552 what the status quo is on this; see also item #182).
553
554 d.  Renaming directories is way too hard.
555
556 Implementations:
557
558 It is perhaps premature to try to design implementation details
559 without answering some of the above questions about desired behaviors
560 but several general implementations get mentioned.
561
562 i.  No fundamental changes (for example, a "cvs rename" command which
563 operated on directories could still implement the current recommended
564 practice for renaming directories, which is to rename each of the
565 files contained therein via an add and a remove).  One thing to note
566 that the status quo gets right is proper merges, even with adds and
567 removals (Well, mostly right at least.  There are a *LOT* of different
568 cases; see the testsuite for some of them).
569
570 ii.  Rename database.  In this scheme the files in the repository
571 would have some arbitrary name, and then a separate rename database
572 would indicate the current correspondence between the filename in the
573 working directory and the actual storage.  As far as I know this has
574 never been designed in detail for CVS.
575
576 iii.  A modest change in which the RCS files would contain some
577 information such as "renamed from X" or "renamed to Y".  That is, this
578 would be generally similar to the log messages which are suggested
579 when one renames via an add and a removal, but would be
580 computer-parseable.  I don't think anyone has tried to flesh out any
581 details here either.
582
583 It is interesting to note that in solution ii. version numbers in the
584 "new file" start where the "old file" left off, while in solutions
585 i. and iii., version numbers restart from 1.1 each time a file is
586 renamed.  Except perhaps in the case where we rename a file from foo
587 to bar and then back to foo.  I'll shut up now.
588
589 Regardless of the method we choose, we need to address how renames
590 affect existing CVS behaviors.  For example, what happens when you
591 rename a file on a branch but not the trunk and then try to merge the
592 two?  What happens when you rename a file on one branch and delete it
593 on another and try to merge the two?
594
595 Ideally, we'd come up with a way to parameterize the problem and
596 simply write up a lookup table to determine the correct behavior.
597
598 190.  The meaning of the -q and -Q global options is very ad hoc;
599 there is no clear definition of which messages are suppressed by them
600 and which are not.  Here is a classification of the current meanings
601 of -q; I don't know whether anyone has done a similar investigation of
602 -Q:
603
604   a.  The "warm fuzzies" printed upon entering each directory (for
605   example, "cvs update: Updating sdir").  The need for these messages
606   may be decreased now that most of CVS uses ->fullname instead of
607   ->file in messages (a project which is *still* not 100% complete,
608   alas).  However, the issue of whether CVS can offer status as it
609   runs is an important one.  Of course from the command line it is
610   hard to do this well and one ends up with options like -q.  But
611   think about emacs, jCVS, or other environments which could flash you
612   the latest status line so you can see whether the system is working
613   or stuck.
614
615   b.  Other cases where the message just offers information (rather
616   than an error) and might be considered unnecessarily verbose.  These
617   have a certain point to them, although it isn't really clear whether
618   it should be the same option as the warm fuzzies or whether it is
619   worth the conceptual hair:
620
621     add.c: scheduling %s `%s' for addition (may be an issue)
622     modules.c: %s %s: Executing '%s' (I can see how that might be noise,
623       but...)
624     remove.c: scheduling `%s' for removal (analogous to the add.c one)
625     update.c: Checking out %s (hmm, that message is a bit on the noisy side...)
626       (but the similar message in annotate is not affected by -q).
627
628   c.  Suppressing various error messages.  This is almost surely
629   bogus.
630
631     commit.c: failed to remove tag `%s' from `%s' (Questionable.
632       Rationale might be that we already printed another message
633       elsewhere but why would it be necessary to avoid
634       the extra message in such an uncommon case?)
635     commit.c: failed to commit dead revision for `%s' (likewise)
636     remove.c: file `%s' still in working directory (see below about rm
637       -f analogy)
638     remove.c: nothing known about `%s' (looks dubious to me, especially in
639       the case where the user specified it explicitly).
640     remove.c: removed `%s' (seems like an obscure enough case that I fail
641       to see the appeal of being cryptically concise here).
642     remove.c: file `%s' already scheduled for removal (now it is starting
643       to look analogous to the infamous rm -f option).
644     rtag.c: cannot find tag `%s' in `%s' (more rm -f like behavior)
645     rtag.c: failed to remove tag `%s' from `%s' (ditto)
646     tag.c: failed to remove tag %s from %s (see above about whether RCS_*
647       has already printed an error message).
648     tag.c: couldn't tag added but un-commited file `%s' (more rm -f
649       like behavior)
650     tag.c: skipping removed but un-commited file `%s' (ditto)
651     tag.c: cannot find revision control file for `%s' (ditto, but at first
652       glance seems even worse, as this would seem to be a "can't happen"
653       condition)
654
655 191.  Storing RCS files, especially binary files, takes rather more
656 space than it could, typically.
657   - The virtue of the status quo is that it is simple to implement.
658     Of course it is also simplest in terms of dealing with compatibility.
659   - Just storing the revisions as separate gzipped files is a common 
660     technique.  It also is pretty simple (no new algorithms, CVS
661     already has zlib around).  Of course for some files (such as files
662     which are already compressed) the gzip step won't help, but
663     something which can at least sometimes avoid rewriting the entire
664     RCS file for each new revision would, I would think, be a big
665     speedup for large files.
666   - Josh MacDonald has written a tool called xdelta which produces
667     differences (that is, sufficient information to transform the old
668     to the new) which looks for common sequences of bytes, like RCS
669     currently does, but which is not based on lines.  This seems to do
670     quite well for some kinds of files (e.g. FrameMaker documents,
671     text files), and not as well for others (anything which is already
672     compressed, executables).  xdelta 1.10 also is faster than GNU diff.
673   - Karl Fogel has thought some about using a difference technique
674     analogous to fractal compression (see the comp.compression FAQ for
675     more on fractal compression, including at least one patent to
676     watch for; I don't know how analogous Karl's ideas are to the
677     techniques described there).
678   - Quite possibly want some documented interface by which a site can
679     plug in their choice of external difference programs (with the
680     ability to choose the program based on filename, magic numbers,
681     or some such).
682
683 192.  "cvs update" using an absolute pathname does not work if the
684 working directory is not a CVS-controlled directory with the correct
685 CVSROOT.  For example, the following will fail:
686
687   cd /tmp
688   cvs -d /repos co foo
689   cd /
690   cvs update /tmp/foo
691
692 It is possible to read the CVSROOT from the administrative files in
693 the directory specified by the absolute pathname argument to update.
694 In that case, the last command above would be equivalent to:
695
696   cd /tmp/foo
697   cvs update .
698
699 This can be problematic, however, if we ask CVS to update two
700 directories with different CVSROOTs.  Currently, CVS has no way of
701 changing CVSROOT mid-stream.  Consider the following:
702
703   cd /tmp
704   cvs -d /repos1 co foo
705   cvs -d /repos2 co bar
706   cd /
707   cvs update /tmp/foo /tmp/bar
708
709 To make that example work, we need to think hard about:
710
711   - where and when CVSROOT-related variables get set
712   - who caches said variables for later use
713   - how the remote protocol should be extended to handle sending a new
714     repository mid-stream
715   - how the client should maintain connections to a variety of servers
716     in a single invocation.
717
718 Because those issues are hairy, I suspect that having a change in
719 CVSROOT be an error would be a better move.
720
721 193.  The client relies on timestamps to figure out whether a file is
722 (maybe) modified.  If something goes awry, then it ends up sending
723 entire files to the server to be checked, and this can be quite slow
724 especially over a slow network.  A couple of things that can happen:
725 (a) other programs, like make, use timestamps, so one ends up needing
726 to do "touch foo" and otherwise messing with timestamps, (b) changing
727 the timezone offset (e.g. summer vs. winter or moving a machine)
728 should work on unix, but there may be problems with non-unix.
729
730 Possible solutions:
731
732    a.  Store a checksum for each file in CVS/Entries or some such
733    place.  What to do about hash collisions is interesting: using a
734    checksum, like MD5, large enough to "never" have collisions
735    probably works in practice (of course, if there is a collision then
736    all hell breaks loose because that code path was not tested, but
737    given the tiny, tiny probability of that I suppose this is only an
738    aesthetic issue).
739
740    b.  I'm not thinking of others, except storing the whole file in
741    CVS/Base, and I'm sure using twice the disk space would be
742    unpopular.
743
744 194.  CVS does not separate the "metadata" from the actual revision
745 history; it stores them both in the RCS files.  Metadata means tags
746 and header information such as the number of the head revision.
747 Storing the metadata separately could speed up "cvs tag" enormously,
748 which is a big problem for large repositories.  It could also probably
749 make CVS's locking much less in the way (see comment in do_recursion
750 about "two-pass design").
751
752 195.  Many people using CVS over a slow link are interested in whether
753 the remote protocol could be any more efficient with network
754 bandwidth.  This item is about one aspect of that--how the server
755 sends a new version of a file the client has a different version of,
756 or vice versa.
757
758 a.  Cases in which the status quo already sends a diff.  For most text
759 files, this is probably already close to optimal.  For binary files,
760 and anomalous (?) text files (e.g. those in which it would help to do
761 moves, as well as adds and deletes), it might be worth looking into other
762 difference algorithms (see item #191).
763
764 b.  Cases in which the status quo does not send a diff (e.g. "cvs
765 commit").
766
767 b1.  With some frequency, people suggest rsync or a similar algorithm
768 (see ftp://samba.anu.edu.au/pub/rsync/).  This could speed things up,
769 and in some ways involves the most minimal changes to the default CVS
770 paradigm.  There are some downsides though: (1) there is an extra
771 network turnaround, (2) the algorithm needs to transmit some data to
772 discover what difference type programs can discover locally (although
773 this is only about 1% of the size of the files).
774
775 b2.  If one is willing to require that users use "cvs edit" before
776 editing a file on the client side (in some cases, a development
777 environment like emacs can make this fairly easy), then the Modified
778 request in the protocol could be extended to allow the client to just
779 send differences instead of entire files.  In the degenerate case
780 (e.g. "cvs diff" without arguments) the required network traffic is
781 reduced to zero, and the client need not even contact the server.
782
783 197.  Analyze the difference between CVS_UNLINK & unlink_file.  As far as I
784 can tell, unlink_file aborts in noexec mode and CVS_UNLINK does not.  I'm not
785 sure it would be possible to remove even the use of temp files in noexec mode,
786 but most unlinks should probably be using unlink_file and not CVS_UNLINK.
787
788 198.  Remove references to deprecated cvs_temp_name function.
789
790 199.  Add test for login & logout functionality, including support for
791 backwards compatibility with old CVSROOTs.
792
793 200.  Make a 'cvs add' without write access a non-fatal error so that
794 the user's Entries file is updated and future 'cvs diffs' will work
795 properly.  This should ease patch submission.
796
797 201.  cvs_temp_file should be creating temporary files in a privately owned
798 subdirectory of of temp due to security issues on some systems.
799
800 202.  Enable rdiff to accept most diff options.  Make rdiff output look
801 like diff's.  Make CVS diff garbage go to stderr and only standard diff
802 output go to stdout.
803
804 203.  Add val-tags additions to the tagging code.  Don't remove the
805 update additions since val-tags could still be used as a cache when the
806 repository was imported from elsewhere (the tags weren't applied with a
807 version which wrote val-tags).
808
809 204.  Add test case for compression.  A buf_shutdown error using compression
810 wasn't caught by the test suite.
811
812 205.  There are lots of cases where trailing slashes on directory names
813 and other non-canonical paths confuse CVS.  Most of the cases that do
814 work are handled on an ad-hoc basis.  We need to come up with a coherent
815 strategy to address path canonicalization and apply it consistently.
816
817 208.  Merge enhancements to the diff package back into the original GNU source.
818
819 209.  Go through this file and try to:
820
821   a.  Verify that items are still valid.
822
823   b.  Create test cases for valid items when they don't exist.
824
825   c.  Remove fixed and no longer applicable items.
826
827 210.  Explain to sanity.sh how to deal with paths with spaces and other odd
828 characters in them.
829
830 211.  Make sanity.sh run under the Win32 bash (cygwin) and maybe other Windex
831 environments (e.g. DGSS or whatever the MSVC portability environemnt is called).
832
833 212.  Autotestify (see autoconf source) sanity.sh.
834
835 213.  Examine desirability of updating the regex library (regex.{c,h}) to the
836 more recent versions that come with glibc and emacs.  It might be worth waiting
837 for the emacs folks to get their act together and merge their changes into the
838 glibc version.
839
840 214.  Make options.h options configure script options instead.
841
842 215.  Add reditors and rwatchers commands.
843
844         - Is an r* command abstraction layer possible here for the commands
845           where this makes sense?  Would it be simpler?  It seems to me the
846           major operational differences lie in the file list construction.
847
848 218.  Fix "checkout -d ." in client/server mode.
849
850 221.  Handle spaces in file/directory names.  (Most, if not all, of the
851 internal infrastructure already handles them correctly, but most of the
852 administrative file interfaces do not.)
853
854 223.  Internationalization support.  This probably means using some kind
855 of universal character set (ISO 10646?) internally and converting on
856 input and output, which opens the locale can of worms.
857
858 225.  Add support for --allow-root to server command.
859
860 227.  'cvs release' should use the CVS/Root in the directory being released
861 when such is specified rather than $CVSROOT.  In my work directory with no CVS
862 dir, a release of subdirectories causes the released projects to be tested
863 against my $CVSROOT environment variable, which often isn't correct but which
864 can complete without generating error messages if the project also exists in
865 the other CVSROOT.  This happens a lot with my copies of the ccvs project.
866
867 228.  Consider adding -d to commit ala ci.
868
869 229.  Improve the locking code to use a random delay with exponential
870 backoff ala Ethernet and separate the notification interval from the
871 wait interval.
872
873 230.  Support for options like compression as part of the CVSROOT might be
874 nice.  This should be fairly easy to implement now using the method options.
875
876 231.  The `cvs watch off' command needs an extension which enables users in the
877 cvsadmin group to turn watch off for users whose logins and email address may
878 not exist anymore.