开发者

svn: turn exported tree into working copy

In order to quickly deploy our app to a new remote server, we exported our branch to a local directory, zip开发者_开发技巧ped it, then unzipped it on the new server.

Now, we want to turn that exported copy (which is an exact replica of the branch in the repo) into a working copy. Is this possible?


If the export is simply a copy of the branch, why not just check out from the branch?

Of course, I've noticed that as long as all of the subversion meta files are present, you can connect a project back to the repository. If you have a subversion client on your server and aren't afraid to work with the command line, you could probably try a "svn status" to see if you can connect to the repository.


For me, I use the following workflow:

  1. Export a specific revision from repo and upload it to my webserver. So I have a live version.
  2. When I exported the revision, I create a tag indicating that this version is live now (e.g. live_from_xxyyzz where xxyyzz is the date of upload)
  3. When I have to do any changes, I change locally, check them in, then do a new export (i.e. go to step 1)

Doing so, there's absolutely no need to turn an exported version back to a working copy since you have your tags that you can trust.

On the other hand, you can simply take your live version (that one on the remote server) and copy it over your working directory. If something's different, you will notice it (as well as missing files or new files).

Edit:

When your exported version shall become a working copy, you have a little trouble using svn: svn (currently) needs an .svn folder of the checked out working copy. These .svn folders hold the versioning information. To put the whole exported version under version control, you'd have to create (and populate) these folders (i.e. copy them from a real working copy into the exported version).

From Subversion 1.7 on, there will be a centralized metadata storage what means that all the versioning related files are stored in one folder per working copy (like for example Git does). That would make solving your problem easier, but for now, I see no other alternative but to copy the .svn folders from a working copy as described above (except really checking out the branch, of course).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜