Loading ...
Sorry, an error occurred while loading the content.

Re: [XP] SCM makes renaming and moving files painful

Expand Messages
  • Steve Berczuk
    ... True enough. But in the meantime you should ask yourself how badly you need the old version history (pre rename). In most situations I ve seen the
    Message 1 of 7 , Aug 28, 2003
    • 0 Attachment
      J. B. Rainsberger wrote:

      > csmajohnson@... wrote:
      >>Over the past week there has been a lot of talk about exclusive locking,
      >>branching and the like. Something I have been grappling with as a side
      >>effect of collective code ownership is the renaming and moving of source
      >>files. In the past since modules didn't belong to me, I wouldn't dream
      >>of moving them to another more appropriate folder or even renaming the
      >>module to be more descriptive ie filefuncs.c vs userAcountInfoReader.c.
      >>
      >>Now though, as long as the tests all pass we don't think twice about
      >>moving stuff around or renaming a module. However I realized that our
      >>current SCM (VSS) doesn't preserver the state to remember where files
      >>were or what the were named. I am wondering to myself if it matters or
      >>if I am fearful of nothing. Do other SCMS like bitkeeper, perforce or
      >>something equally exotic handle this kind of thing for you ?
      >
      >
      > Subversion does, or at least will.

      True enough. But in the meantime you should ask yourself how badly you
      need the old version history (pre rename). In most situations I've seen
      the technique of just placing a comment in the new name should be
      enough. Particularly in an XP environment, it seems that you really
      would not be spending that much time tracing through old history. Just
      rename it and don't worry too much ;)

      This is a common excuse for people delaying a move from (say) VSS to
      (say) CVS: they are worried about the history. If most of the time you
      are working off of the HEAD of the codeline, you rarely trace things
      back (particularly if you have some tests that you can run.) you can
      just check out the latest from VSS and import that into CVS. Worst case
      is that you keep the VSS database around for the rare instance that you
      need to go back.
      I've had arguments with release engineers about this, but most of the
      time their fears are based on things like "we SHOULD keep the history..."

      -steve

      --
      Steve Berczuk | steve@... | http://www.berczuk.com
      SCM Patterns: Effective Teamwork, Practical Integration
      www.scmpatterns.com
    • Bishop, Murray
      ... Hi Mike. I don t know about the other SCMS, but in CVS I d do that rename like this: ren filefuncs.c userAcountInfoReader.c cvs rm filefuncs.c cvs add
      Message 2 of 7 , Aug 29, 2003
      • 0 Attachment
        On Thu, 28 Aug 2003 12:16:17 -0400 csmajohnson@... wrote:

        > Over the past week there has been a lot of talk about exclusive locking,
        > branching and the like. Something I have been grappling with as a side
        > effect of collective code ownership is the renaming and moving of source
        > files. In the past since modules didn't belong to me, I wouldn't dream
        > of moving them to another more appropriate folder or even renaming the
        > module to be more descriptive ie filefuncs.c vs userAcountInfoReader.c.
        >
        > Now though, as long as the tests all pass we don't think twice about
        > moving stuff around or renaming a module. However I realized that our
        > current SCM (VSS) doesn't preserver the state to remember where files
        > were or what the were named. I am wondering to myself if it matters or
        > if I am fearful of nothing. Do other SCMS like bitkeeper, perforce or
        > something equally exotic handle this kind of thing for you ?
        >
        > --mike

        Hi Mike.

        I don't know about the other SCMS, but in CVS I'd do that rename like this:

        ren filefuncs.c userAcountInfoReader.c
        cvs rm filefuncs.c
        cvs add userAcountInfoReader.c
        cvs ci

        I'd then be sure that retrieving all the files at a tag or time before the
        commit (cvs ci) would get filefuncs.c (and after would get
        userAcountInfoReader.c).


        I'm learning how to use VSS, and what you wrote made me fear that renaming
        'file' (to 'renamed-file' say) would rename that in revisions in the past,
        so if I ever wanted to get "all the files in the project just like when I
        labeled them release-37 six months ago", I'd be snookered - I'd get
        'renamed-file' instead of 'file'. So I tried the sequence below, and found
        that VSS did seem to remember what files were called in the past, in this
        case.

        <sequence>
        C:\temp\VssHack>md Labeled
        C:\temp\VssHack>cd Labeled
        C:\temp\VssHack\Labeled>echo first>file

        Crank up the VisualSource gui, and in that:
        - add a project named $/VssHacks/Labeled
        - add 'file' to that project
        - label $/VssHacks/Labeled as 'file-first'
        - rename 'file' to be 'renamed-file'
        - label $/VssHacks/Labeled as 'first-renamed-file'
        - get $/VssHacks/Labeled as 'file-first' to directory
        C:\temp\VssHack\Labeled\1
        - get $/VssHacks/Labeled as 'first-renamed-file' to directory
        C:\temp\VssHack\Labeled\2

        C:\temp\VssHack\Labeled>dir 1
        30/08/2003 01:30 PM 7 file
        30/08/2003 01:30 PM 48 vssver.scc

        C:\temp\VssHack\Labeled>dir 2
        30/08/2003 01:30 PM 7 renamed-file
        30/08/2003 01:30 PM 48 vssver.scc
        </sequence>

        Best,
        Murray
      • Bill de hÓra
        ... History only seems to matter a) for releases, b) the last week or so. If people have been labelling releases the answer is simple enough. Check the
        Message 3 of 7 , Aug 31, 2003
        • 0 Attachment
          Steve Berczuk wrote:

          > This is a common excuse for people delaying a move from (say) VSS to
          > (say) CVS: they are worried about the history.

          History only seems to matter a) for releases, b) the last week or
          so. If people have been labelling releases the answer is simple
          enough. Check the releases into the new VCS in time order and tag
          them. The lasts week's history is much the same - check each in day
          of the last week or so from the old VCS into the new VCS.

          Bill de hÓra
        Your message has been successfully submitted and would be delivered to recipients shortly.