Help in understanding SVN Externals

前端 未结 5 640
后悔当初
后悔当初 2021-01-06 01:50

I\'m looking into svn externals for my company, and it seems like it would be a good feature for us to use. We have several products that often reference shared components,

5条回答
  •  悲&欢浪女
    2021-01-06 01:53

    You can use date specifiers to ensure you get corresponding revisions when you update.

    We've done it for a tool that runs PC-Lint; we like to run it on each revision so that we can diff the results.

    It's a bit obnoxious in its implementation -- we:

    • determine what rev the working copy is at (using svnversion)
    • determine what rev the HEAD is at (using svn info)
    • grab the timestamps for all revisions up to and including head (using svn log)
    • bump the timestamps by .999 seconds to be "sure" we get the rev (yay magic!)
    • update to each revision (using svn update -r {sometimestamp})
    • run PC-Lint on the working copy, diff, mailout, trigger klaxons, whatever

    (Complexity worthy of Rube Goldberg, isn't it? Upvotes and undying gratitude for anyone who can suggest a better solution.)

    You may also be interested in the svn book's section on Peg and Operative Revisions, which I've just discovered -- this seems to be a relatively new addition.

提交回复
热议问题