简体   繁体   中英

How to manage historical externals in SVN

I have some projects which use a few externals (libraries) that are likely to change overtime. I try and keep the project clean with the trunk/branches/tags pattern, and when I make a tag (or release), I'd like to freeze the entire source in time, that is, the externals as they were at that time.

I can think of two ways to do this:

  • I could set the externals to point to a specific revision, but that seems a bit of a hassle, unless there is an automation (some nice shell command to make all externals point to the latest revision at that moment?)
  • I could localize the externals, if again there is some nice automation that would grab the current external and "localize" it, ie making it a permanent hard copy in the project.

Do such things exist with TortoiseSVN? Or am I corrupting the system somehow?

As far as I know TortoiseSVN doesn't provide such sophisticated functionality. You need to implement own scripts for checking these externals/changing them, ie what you've called automation.

Actually, we have the same inconveniences in our projects. We have a project tree (trunk - our working sources) with externals to tags (other teams working sources), they have own tags, and, moreover, we have a tags of our project tree of course. So, we have nested externals of 3, 4 and more orders. What we have done at this moment is the perl script (calls svn command line tool and process its result) which checks recursively whether all externals in our project tree tag are externals to tags or not (it is our own rule - in tags all externals must be to tags). The main point in this checking is that if at least one of externals points to trunk - the main idea behind our project tree would become pointless (based on the another important rule - never make changes in tags). As a rule it is a problematic to get that particular state of sources if these rules are violated (and as a result even inability to build application from these sources).

Summing up, I'd recommend developing own concepts, rules and use scripts for automation where it's possible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM