<p>I'm developing a library alongside several projects that use it, and I've found myself frequently modifying the library at the same time as a project (e.g., adding a function to the library and immediately using it in the project).<br>
As a result, the project would no longer compile with previous versions of the library.</p>

<p>So if I need to rollback a change or test a previous version of the project, I'd like to know what version of the library was used at check-in.<br>
I suppose I could do this manually (by just writing the version number in the log file), but it would be great if this could happen automatically.</p>

[{'answer_id': 23624, 'author': 'thelsdj', 'author_id': 163, 'author_profile': 'https://Stackoverflow.com/users/163', 'pm_score': 0, 'selected': False, 'text': '<p>One option is to use a single subversion repository and check-in changes that effect both library and project at the same time. That way you know that whatever revision of the project you are on requires the same revision of the library.</p>\n'}, {'answer_id': 23702, 'author': 'tghw', 'author_id': 2363, 'author_profile': 'https://Stackoverflow.com/users/2363', 'pm_score': 2, 'selected': False, 'text': "<p>I think if I were going to do this, I would use tags.  It would be pretty easy to write a script that would tag both repositories with the same ID each time you upgraded the library and used it in the project.  Then, if you need to roll back to a previous version, you just see what its most recent tag was, and roll the library back to that version.</p>\n\n<p>UPDATE: Sorry, I've been in Mercurial land for a while, and forgot that subversion doesn't directly support tagging.  Assuming you use the usual subversion directory structure</p>\n\n<pre><code>/\n  /trunk\n  /tags\n  /branches\n</code></pre>\n\n<p>you just need to run</p>\n\n<pre><code>svn copy trunk/ tags/TagName\n</code></pre>\n\n<p>on both repos, with the same tag name.  Subversion is pretty good about smart copies, so you don't need to worry about disk space.</p>\n"}, {'answer_id': 23811, 'author': 'denis phillips', 'author_id': 748, 'author_profile': 'https://Stackoverflow.com/users/748', 'pm_score': 2, 'selected': False, 'text': "<p>An option that might work for you is to use an svn:external reference to the library. When tagging the project, you can do one of two things:</p>\n\n<ul>\n<li>Update the svn:external to refer to a specific revision of the library; OR</li>\n<li>Update the svn:external to refer to a new tag that you make on the library. </li>\n</ul>\n\n<p>Since the svn:external metadata will be part of the main project's commit history, you can always get the tag on the main project and it will refer to the correct version of the library. We do it and it works very well. It also comes in handy when you want to freeze the version of the library code that you depend on in preparation for a release.</p>\n"}, {'answer_id': 23816, 'author': 'Orion Edwards', 'author_id': 234, 'author_profile': 'https://Stackoverflow.com/users/234', 'pm_score': 2, 'selected': False, 'text': '<p>You might find <a href="http://piston.rubyforge.org/" rel="nofollow noreferrer">piston</a> provides a solution</p>\n\n<p>It\'s primarily used for importing ruby on rails plugins, but I don\'t see why it shouldn\'t work for any subversion repositories.</p>\n\n<p>Basically what it does is this:</p>\n\n<ul>\n<li>svn export latest revision of the remote path</li>\n<li>commit these files into your local svn as if they were local files</li>\n<li>attach metadata in the form of svn properties about the remote path and revision</li>\n</ul>\n\n<p>This means you can keep a reference to a particular version of a remote repo without having to have it constantly updated like with an svn external.</p>\n\n<p>if you want to update your local copy of the library to the latest remote version, you just do <code>piston update</code></p>\n\n<p>You should also be able to look at the history of updates, by simply looking at the metadata - svn properties are versioned just like files and everything else</p>\n'}]
['https://Stackoverflow.com/questions/23603', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/112/']