info-cvs
[Top][All Lists]
Advanced

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

Re: BRANCH LABEL FOR DIRECTORIES


From: Greg A. Woods
Subject: Re: BRANCH LABEL FOR DIRECTORIES
Date: Mon, 18 Jun 2001 14:45:24 -0400 (EDT)

[ On Monday, June 18, 2001 at 10:26:43 (-0400), Noel L Yap wrote: ]
> Subject: Re: BRANCH LABEL FOR DIRECTORIES
>
> Greg's comments generally fall under the "That's by design" category but it's
> not obvious that that design is good.
> 
> IMHO, it is not.  Directories are as first class a file system element as 
> files
> are.  I've been working lately with a SCM tool that versions directories and
> I've found that it makes life much easier (at least with regards to renames 
> and
> branching) .  It's true that I could possibly go back to using something 
> without
> this capability, but I would much prefer if it were there.

This kind argument is rather like the one some authors use when
comparing the writing skills of people who use pen and paper vs. those
writers who use a word processor.

Obviously if you've got the ability to rename files willy-nilly then
you're bound to eventually make use of it.  Is this a good thing?  I've
never thought so.  Just like a writer with an ink pen and paper I like
to plan my naming and layouts beforehand so that I don't have to rename
anything half-way through.  (Same goes for choosing internal naming
conventions for variables, functions, macros, etc., etc., etc.)

Obviously the ability to rename things in any ad hoc fashion is very
powerful.  I do often globally rename a variable or function (even if
it's the same name used privately in many similar namespaces).  One can
think of this as a poor-man's equivalent to what object-oriented
programmers call "refactoring".  In the OO world refactoring browsers
are all the rage because they allow a developer to combine and split
class definitions without doing a lot of extra typing and manually
keeping track of the state of things during the process.

However I always think very very hard about WHEN I do any kind of
renaming.  There are very obvious good and very obvious bad times to do
such renaming in a software development project.  Much of the timing
depends on what impact it will have on the version control system.  Even
when you can rename things with ease (eg. global search & replace on a
function name), it's not always a good idea to do so.  You have to
understand your current position in the process before you make such
"high-impact" changes.

So in many senses the use of pen-and-paper is a tool in and of itself to
help you write better.  CVS forces users to think long and hard about
their reasons for renaming/moving files, and to very carefully plan the
timing of any renames/moves (or at least it will once they've been
burned once by it!  ;-).

If you want to use a word-processor because you don't want to do your
thinking ahead of time then that's your perogative.  :-)


(Note that there has been a lot of much more positive discussion in this
forum in the past about how to plan large-scale renames so that the
limitations of CVS don't get in your way.  Perhaps some of that advice
should someday find its way into the manual too.)

-- 
                                                        Greg A. Woods

+1 416 218-0098      VE3TCP      <address@hidden>     <address@hidden>
Planix, Inc. <address@hidden>;   Secrets of the Weird <address@hidden>



reply via email to

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