svnhistorysvn-externals

Update svn checkout to specific date including externals


I want to perform an svn update to a specific date, and I can do this with svn update -r {2010-10-17}. Unfortunately when this encounters an external it will do the update within the external without passing through the -r {2010-10-17} option. This results in us getting the correct past revision of the base code, but the latest (undesired) versions of many of the externals.

How can I update to a specific revision or date and have this recurse correctly through the externals?

(Note: I understand that the mistake here might have been to use externals with no explicit revisions specified.)


Solution

  • I hope, anybody will implement my common-sense logic (limited to directory-type externals in some areas) into bash and cmd-script sooner or later and we'll get "definitive answer" to this repeating question

    Your base task is:

    As result you'll have Mixed Working Copy, but superrepo and externals will be in state "for some revision in the past"

    Note:

    Additional sample for constructing local path to directory with externals (nested WC really) on more complex case.

    For

    >svn propget svn:externals -R
    tags\1.0.1 - -r 2 https://subversion.assembla.com/svn/subversion-trouble-shooting/trunk/lib@2 lib
    
    trunk - https://subversion.assembla.com/svn/subversion-trouble-shooting/trunk/lib lib
    

    finals paths to externals in my WC will be (relative to WC-root)

    tags\1.0.1\lib
    trunk\lib