One feature missing from early (and even relatively recent; less than v1.5) versions of Subversion is the ability to specify universally the exact revision of a file/directory within a repository across all commands/features (such as “svn switch” and externals). The difference between:
- “file X/Y/Z which existed at revision 99”, and
- “the file which exists if you backtrack from HEAD to revision 99 on path X/Y/Z”
is subtle but continues to catch many people out, especially those of us who use older (< 1.5) versions of SVN for one reason or another, typically because RHEL/CentOS 5 include SVN 1.4. I won’t attempt to rewrite the excellent chapter about peg and operative revisions in the online Version Control with Subversion book, but it’s worth remarking on nonetheless. It’s caused myself and my colleagues no end of headaches when trying to do predictable deployments using a specified SVN URL. Essentially, it means these two things are not necessarily equivalent:
svn sw svn+ssh://user@myrepo/X/Y/Z@99 myworkingcopy
svn sw -r 99 svn+ssh://user@myrepo/X/Y/Z myworkingcopy
If, between revision 99 and HEAD, you’ve renamed some directories within the path X/Y/Z, then backtracking the history of the current X/Y/Z (as of HEAD; this is the operative revision) doesn’t necessarily lead you back to X/Y/Z as it was at revision 99 (the peg revision). This is quite common when rearranging SVN repositories.