Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-2961

Gracefully handle WC format bump (to 9) for Subversion 1.5

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: 1.5.0
    • Component/s: libsvn_wc
    • Labels:
      None

      Description

      This thread describes the problem:
      
      http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=130643
      
      In summary, we've introduced several new pieces of WC meta data in the entries
      file for Subversion 1.5, including the following fields:
      - changelist
      - keep-local
      - depth
      
      The first two fields -- if present -- would experience data loss when a 1.4
      client is used on a WC written by a 1.5 client.  The depth field (and its
      usage's impact on a WC), however, will actually "corrupt" a WC for 1.4 client.
      

      http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=130643

      1. 1_patch.txt
        0.6 kB
        Daniel Rall

        Activity

        Hide
        dlr Daniel Rall added a comment -

        In r27055, I've committed a new script to trunk,
        tools/client-side/change-svn-wc-format.py.  This script allows users to revert
        the auto-upgrade of their WC format by a Subversion 1.5 client (or
        vice-versa, update it back to format 9).  Example usage:
        
          change-svn-wc-format.py WC_PATH SVN_VERSION [--verbose] [--force]
        
        This script currently only changes the format number (without
        re-writing the .svn/entries file), relying on the behavior of a
        Subversion 1.4 client to ignore unknown fields in entry records in an
        entries file, and silently drop these fields when re-writing the
        entries file.
        
        This approach was discussed on IRC, and subsequently suggested on the dev list
        by markphip:
        
          Date: Fri, 5 Oct 2007 19:47:42 -0400
          From: Mark Phippard <markphip@gmail.com>
          Subject: We should bump WC format version number for 1.5.
          Message-ID: <ff892c5d0710051647i3841aa44g7bd5d05ea990f117@mail.gmail.com>
        
        http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=130788
        

        Show
        dlr Daniel Rall added a comment - In r27055, I've committed a new script to trunk, tools/client-side/change-svn-wc-format.py. This script allows users to revert the auto-upgrade of their WC format by a Subversion 1.5 client (or vice-versa, update it back to format 9). Example usage: change-svn-wc-format.py WC_PATH SVN_VERSION [--verbose] [--force] This script currently only changes the format number (without re-writing the .svn/entries file), relying on the behavior of a Subversion 1.4 client to ignore unknown fields in entry records in an entries file, and silently drop these fields when re-writing the entries file. This approach was discussed on IRC, and subsequently suggested on the dev list by markphip: Date: Fri, 5 Oct 2007 19:47:42 -0400 From: Mark Phippard <markphip@gmail.com> Subject: We should bump WC format version number for 1.5. Message-ID: <ff892c5d0710051647i3841aa44g7bd5d05ea990f117@mail.gmail.com> http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=130788
        Hide
        kfogel Karl Fogel added a comment -

        I came to this issue to take ownership, and found it owned by you, Dan.  If
        you're taking the Subversion side of this as well as the script side, great! 
        But if not, let me know.
        

        Show
        kfogel Karl Fogel added a comment - I came to this issue to take ownership, and found it owned by you, Dan. If you're taking the Subversion side of this as well as the script side, great! But if not, let me know.
        Hide
        dlr Daniel Rall added a comment -

        Attachment 1_patch.txt has been added with description: Patch for libsvn_wc/wc.h

        Show
        dlr Daniel Rall added a comment - Attachment 1_patch.txt has been added with description: Patch for libsvn_wc/wc.h
        Hide
        dlr Daniel Rall added a comment -

        Created an attachment (id=751)
        Patch for libsvn_wc/wc.h
        
        

        Show
        dlr Daniel Rall added a comment - Created an attachment (id=751) Patch for libsvn_wc/wc.h
        Hide
        kfogel Karl Fogel added a comment -

        Some notes on The Plan, from IRC just now:
        
        <dlr>    kfogel: I only kinda started on the core library patch for
                 issue #2961.  I've attached the tiny patch to the issue.
        
        <kfogel> dlr: looking
        
        <dlr>    I'm guessing that we need to add some actual upgrade logic as
                 well.
        
        <kfogel> dlr: I've still been toying with the idea of "on-demand
                 bump", that is, only when one of the nasty features is used.
        
        <kfogel> But with your script, maybe it's okay to just upgrade
                 unconditionally?
        
        <dlr>    yup
        
        <kfogel> (the on-demand strategy was controversial even without your
                 script)
        
        <kfogel> One thing I want to do is make sure the script is referenced
                 in any version-mismatch error message between 8 and 9.
        
        <kfogel> oh
        
        <kfogel> wait
        
        <kfogel> too late for that, since it's a 1.4 client that would get the
                 error
        
        <kfogel> heh
        
        <kfogel> So, we should make a generic page for such notices now, and
                 have 1.5 refer to the page, in case we have *future* downgrade
                 scripts.
        
        <kfogel> I'll transcribe this all into the issue.
        
        <dlr>    sounds good
        
        <kfogel> ok
        
        

        Show
        kfogel Karl Fogel added a comment - Some notes on The Plan, from IRC just now: <dlr> kfogel: I only kinda started on the core library patch for issue #2961. I've attached the tiny patch to the issue. <kfogel> dlr: looking <dlr> I'm guessing that we need to add some actual upgrade logic as well. <kfogel> dlr: I've still been toying with the idea of "on-demand bump", that is, only when one of the nasty features is used. <kfogel> But with your script, maybe it's okay to just upgrade unconditionally? <dlr> yup <kfogel> (the on-demand strategy was controversial even without your script) <kfogel> One thing I want to do is make sure the script is referenced in any version-mismatch error message between 8 and 9. <kfogel> oh <kfogel> wait <kfogel> too late for that, since it's a 1.4 client that would get the error <kfogel> heh <kfogel> So, we should make a generic page for such notices now, and have 1.5 refer to the page, in case we have *future* downgrade scripts. <kfogel> I'll transcribe this all into the issue. <dlr> sounds good <kfogel> ok
        Hide
        kfogel Karl Fogel added a comment -

        Take from dlr, with his permission.
        

        Show
        kfogel Karl Fogel added a comment - Take from dlr, with his permission.
        Hide
        kfogel Karl Fogel added a comment -

        Fixed in r27103.
        

        Show
        kfogel Karl Fogel added a comment - Fixed in r27103.

          People

          • Assignee:
            kfogel Karl Fogel
            Reporter:
            dlr Daniel Rall
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development