简体   繁体   中英

Create SVN branch with no revision history

We have a situation where we have to give a third party access to an asp.net solution versioned with SVN. We have scrubbed Web.config and other files of sensitive data and would now like to create a feature branch for the contractor. Is there a way to create the feature branch so that only the HEAD revision is visible and all prior revision history is locked down? Ideally, we would like to have a single repository and use the TRUNK/BRANCH features of subversion.

Alternate Methods

  1. Could we dump -> dumpfilter -> load a copy of the trunk into a new branch? It seems like subversion would consider them different repositories and make merging troublesome.

  2. If we were to have to use two separate repositories, how difficult would it be to keep them synced using svnadmin dump/load?

  3. Could we dump -> dumpfilter (exclude just the sensitive files) -> load into a new repository, switch to that, and create the branch from there?

Any help would be greatly appreciated.

The easiest way is to create the branch, then do an svn export of the code you want in that branch, then do an svn add . That way, the files in the branch have no connection to the files elsewhere.

Of course you can't use merge tracking to do merges between this branch and your other branches.

You can setup Apache httpd security and svnserve security to limit the developer to only seeing this branch. Why not do that?

You might want to try that, and see if svn log shows changes that took place on other branches or the trunk. Even if it does, this might be okay because there might not be proprietary information in the log. And, if there is, it can easily be scrubbed by changing the svn:log revision property.

The really easiest way will be

  • Create separate repo for contractor
  • Import HEAD of trunk to this new repo
  • Link contractor's repo to MainRepo into any location with svn:externaks
  • Give to contractor authorization credential only for his repo

No history, no access, no troubles (I suppose) with merges

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