如何从 svn 切换到 bzr 以在本地工作

发布于 2024-10-07 17:23:52 字数 212 浏览 0 评论 0原文

我已经在互联网上导入(签出)一些只读存储库

$ svn co http://some.repo/at/somesite read-only

,现在我想处理这个只读存储库(而且我对 bzr 的经验比 svn 更好),所以我想将此存储库从 svn 更改为 bzr 存储库在本地工作我该怎么做,还有一件事是 svn 支持像 bzr 这样的本地存储库

i have imported(checkout) some read-only repository on the Internet

$ svn co http://some.repo/at/somesite read-only

now i want to work on this read-only (also i have better experience with bzr than svn) ,so i want to change this repository from svn to a bzr repository for working locally how can i do that and one additional thing does svn support local repositories like bzr

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梦年海沫深 2024-10-14 17:23:52

您不应该直接使用 Subversion 来签出代码。使用 Bazaar 来做到这一点。例如,

bzr svn-import http://feedparser.googlecode.com/svn/ feedparser
cd feedparser
bzr branch trunk mybranch
cd mybranch
bzr checkout
# hack...

查看文档Subversion 迁移页面,以及 bzr help svn-import了解更多详情。

解决你的第二个问题

svn是否支持本地存储库
喜欢bzr

Subversion 基于服务器-客户端模型,而在 git、bzr 和 Mercurial 等分布式 VCS 中,它们都集成为一个。您可以在本地运行一台 Subversion 服务器,但是,SVN 存储库应该由一台且一台 SVN 服务器提供服务。使用分布式 VCS,您可以克隆整个存储库(或者在 bzr 的情况下至少是一个分支),这意味着您拥有提供克隆服务并让其他人使用所需的所有数据和元数据从你那里克隆。与分布式 VCS 不同,当您执行 svn checkout 时,您不会在本地创建存储库的完整副本;您只需创建存储库的本地工作副本,即受修订控制的文件和部分(但不是全部)元数据。 SVN 存储库的工作本地副本不足以充当存储库本身;您不能将该工作副本放在服务器上并让其他人从中进行结账。

You shouldn't use Subversion directly to checkout the code. Use Bazaar to do it. For example

bzr svn-import http://feedparser.googlecode.com/svn/ feedparser
cd feedparser
bzr branch trunk mybranch
cd mybranch
bzr checkout
# hack...

Check the documentation, the Subversion Migration page on the bzr wiki, and bzr help svn-import for more details.

To address your second question

does svn support local repositories
like bzr

Subversion is based off of a server-client model, whereas in distributed VCSes like git, bzr, and Mercurial, it's all sort of rolled into one. You can have a Subversion server running locally, however, an SVN repository should be served by one, and only one SVN server. With a distributed VCS, you clone an entire repository (or at least a branch, in bzr's case), meaning that you have all the data and metadata necessary for you to serve up your clone and have other people clone from you. Unlike distributed VCSes, you do not create an entire copy of the repository locally when you do svn checkout; you only create local working copies of the repository, which is the files under revision control and some (but not all) of the metadata. A working local copy of a SVN repository is insufficient to act as a repository itself; you can not put that working copy on a server and let other people do checkouts from it.

晨曦÷微暖 2024-10-14 17:23:52

您是否使用过 bzr-svn 这是一个使用 SVN 存储库的工具通过使用集市查看?

您需要查看bzr-svn 文档< /a>,它描述了如何使用 bzr 从 SVN 简单地签出。

另外,对于 SVN,您必须在计算机上设置本地 SVN 服务器/存储库,而不是像 git/mercurial/bazaar 那么简单。

Have you looked at using bzr-svn which is a tool for working with SVN repositories by checking out using bazaar?

You will want to take a look at the documentation for bzr-svn, which describes how to simply check out from SVN with bzr.

Also, for SVN, you would have to set up a local SVN server/repo on your machine, not as simple as git/mercurial/bazaar.

花落人断肠 2024-10-14 17:23:52

Bazaar 实际上可以直接在 Subversion 工作副本上运行。虽然最好签出/克隆到 Bazaar 存储库(使用 bzr checkoutbzr clone;但无需使用 svn-import >),大多数 Bazaar 命令应该像您完成了“轻量级结账”一样工作。为了处理这个问题,Bazaar 在“.svn”目录中创建一个“bzr”目录。

但是,这不允许本地提交,因此在这种情况下不起作用。幸运的是,您可以通过克隆现有存储库(或直接从主 SVN 存储库执行此操作)转移到 Bazaar 签出:

# you can clone from the old working copy directory:
bzr clone old-svn-working-copy new-bzr-branch-directory
# or from the original repository:
bzr clone http://some.repo/at/somesite new-bzr-branch-directory

然后您可以移动您所做的任何未提交的更改,如下所示:

cd new-bzr-branch-directory
bzr merge --uncommitted ../old-svn-working-copy

Bazaar can actually operate directly on Subversion working copies. While it may be preferable to checkout/clone to a Bazaar repository (using bzr checkout or bzr clone; there is no need to use svn-import), most Bazaar commands should work as if you had done a "lightweight checkout". To handle this, Bazaar create a "bzr" directory in the ".svn" directory.

However, that doesn't allow local commits, and so it doesn't work in this situation. Fortunately, you can move to a Bazaar checkout by cloning the existing repository (or do this directly from the master SVN repository):

# you can clone from the old working copy directory:
bzr clone old-svn-working-copy new-bzr-branch-directory
# or from the original repository:
bzr clone http://some.repo/at/somesite new-bzr-branch-directory

then you can move over any uncommitted changes you made like this:

cd new-bzr-branch-directory
bzr merge --uncommitted ../old-svn-working-copy
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文