问题描述
目前,我公司正在使用cvs进行版本控制.我想在本地使用Mercurial,因为它具有灵活性和合并功能.这将使我的工作容易得多.
Currently my company is using cvs for version control. I want to use mercurial locally because of it's flexibility and merging capabilities. This will make my job a lot easier.
这应该怎么做?
推荐答案
第一 :本地获取CVS存储库.
First: Get the CVS repository locally.
第二 :在此CVS存储库上本地创建一个Mercurial存储库.这将用作您的远程Merurial服务器.
Second: Create a mercurial repositories locally over this CVS repository. This will be used as your remote mercurial server.
第三 :克隆此软件资源库,您在这里工作吗?
Third: Clone this mercurial repository and do you work here.
Mercurial提供了比cvs更好的合并支持,并使您的工作更加轻松.提交回CVS需要额外的步骤. 分步 就是这样的.工作流程看起来很复杂,但实际上很容易.保持流程图紧密.
Mercurial provides better merge support than cvs and will make your work easier. Commit back to CVS needs an extra step. Here is how this works, step-by-step. The workflow looks complicated, but is actually easy. Keep the flow-charts close.
1)本地CVS存储库::使用CVS签出创建本地存储库.
1) Local CVS repository: Create a local repo with CVS checkout.
2)远程HG存储库:在此CVS存储库上进行商品存储. (HG初始化; HG添加; HG提交).该回购协议将像远程Mercurial存储库一样使用.保持此文件夹干净,仅用于在CVS之间传输文件.
2) Remote HG repository: Make a mercurial repo over this CVS repo. (HG init; HG add; HG commit). The repo will be used like a remote mercurial repository. Keep this folder clean and use this only to transfer files from-and-to CVS.
3)本地HG存储库:创建一个新文件夹,您将在其中进行所有工作. (HG克隆).将所有CVS文件添加到hg-ignore-list.
3) Local HG repository: Create a new folder where you will do all your work. (HG clone). Add all CVS files to the hg-ignore-list.
4)开发::在此处进行工作,并在需要时"hg添加/提交".
4) Development: Do the work here and ‘hg add/commit’ when needed.
将工作推回CVS之前的准备工作:(步骤5-8)
5)CVS更新:(本地CVS存储库=远程HG存储库)
5) CVS update: (local CVS repository = remote HG repository)
CVS更新:更新本地CVS存储库
CVS update: Update the local CVS repository
hg commit:在远程Merurial分支中提交CVS更新的代码
hg commit: Commit the CVS updated code in the remote mercurial branch
汞更新:更新您的工作副本以使CVS更改处于活动状态.
hg update: Update your working copy to make the CVS changes active.
6)HG拉动::检查本地商品回购的更改并拉出更改.
6) HG pull: Check for changes on your local mercurial repo and pull the changes.
7)HG合并::将所有CVS更改合并到您本地的软件仓库中.大多数更改将自动合并.
7) HG merge: Merge all CVS changes on your local mercurial repo. Most changes will merge automatically.
8)HG提交:合并后提交更改.
现在您可以将工作推送到远程HG repo和CVS.
9)本地HG推送::将本地工作推送到远程仓库.
9) Local HG push: Push your local work to the remote repo.
10)远程HG更新:更新以使您的工作副本可以查看推送的更改.
10) Remote HG update: Update to let your working copy view the pushed changes.
11)CVS提交:通过CVS提交将远程商品仓库中的更改提交给CVS.
11) CVS commit: Commit the changes in your remote mercurial repo to CVS with a CVS commit.
2对这项工作的看法:分步操作:容器视图:
2 view on this work:Step-by-step:Container view:
这篇关于如何在中央CVS存储库中本地使用mercurial?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!