分步集市工作流程

发布于 2024-10-18 05:14:27 字数 1410 浏览 6 评论 0原文

在我工作的地方,我们(大部分)都是两人一组工作。我们已经看到了版本控制的需求,并且由于其明显的灵活性,我们将使用 bazaar 作为我们的分布式版本控制系统。

经过一番实验,我们一致认为,为了建立一个项目,我们应该使用以下步骤:

在服务器上

  1. bzr init (初始化项目)
  2. bzr add (告诉bzr 来跟踪当前目录中的所有文件,因此在运行此命令之前请确保项目框架中没有不必要的文件)
  3. bzr commit -m "initial commit" (将添加的文件提交到bzr 用于版本控制)

在开发机器上

  1. 在您的本地机器上,执行 bzr 分支 project_dir

日常工作

我们目前正在尝试建立一个工作流程,将为我们工作。这是我们同意每天要做的事情:

  1. pull_path 中提取最新更改
  2. 编码并提交。注意。您的提交将保存在您的本地计算机上。
  3. 请参阅第 1 步。
  4. 将您的更改推送到push_path(注意。push_path = pull_path)
  5. 如果有任何冲突:
    • 首先尝试bzr解析
    • 如果失败,请与您的合作伙伴联系并进行手动解决(打开 file.OTHER、file.BASE 和 file.THIS 并进行相关更改)。
    • 提交您的更改(bzr 提交
    • 再次推送(bzr 推送
    • 重复上述子点 (#5),直到解决所有冲突。

就工作流程而言,这是用bazaar进行版本控制的正确方法吗?我们遇到过这样的问题:每次其他团队成员将更改推送到服务器时,我们的提交评论都会“更改所有权”。我很确定这不是它应该如何工作的,但这也可能是由于在项目设置阶段选择的某些选项造成的。

作为这里的 VCS 布道者,我正在编写一份供团队使用的指南,特别是随着团队的发展供新人使用,如果能有一套“正确”的步骤来完成工作,那就太好了。我们将非常感谢您为建立一个良好且简单的分步流程以充分利用 bzr 所做的贡献。请在此处添加您的贡献。

提前谢谢大家:)

Where I work, we work (mostly) in pairs. We have seen the need for version control, and we will be using bazaar as our distributed version control system, due to its apparent flexibility.

After some experimentation, we have agreed that in order to set up a project, we should use the following steps:

On Server

  1. bzr init (initializes the project)
  2. bzr add (tells bzr to track all files in current directory, so please make sure you do not have unnecessary files in your project skeleton before you run this command)
  3. bzr commit -m "initial commit" (commits the added files to bzr for version control)

On Development Machine

  1. On your local machine, do a bzr branch project_dir

Daily routine

We are currently trying to establish a workflow that will work for us. This is what we have agreed to do daily:

  1. Pull down latest changes from pull_path
  2. Code and commit. NB. Your commits will be saved on your local machine.
  3. See step 1.
  4. Push your changes to push_path (NB. push_path = pull_path)
  5. If there is any conflict:
    • Try bzr resolve first.
    • If that fails, get your partner and do a manual resolve (open file.OTHER, file.BASE and file.THIS and make relevant changes).
    • Commit your changes (bzr commit)
    • Push again (bzr push)
    • Repeat the above sub-points (#5) until all conflicts are resolved.

In terms of the workflow, is this the right way to do version control with bazaar? We have encountered problems where our commit comments 'change ownership' everytime the other team member pushes changes to the server. I'm pretty sure this is not how it's supposed to work, but it may also be due to certain options selected during the project setup phase.

As the VCS evangelist here, I am working on a guide to be used by the team, and particularly by new people as the team grows, and it would be great to have a 'proper' set of steps to follow in getting work done. Your contributions in establishing a nice and simple step-by-step flow to get the best out of bzr would be greatly appreciated. Please add your contributions here.

Thank you all in advance :)

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

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

发布评论

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

评论(2

是你 2024-10-25 05:14:27

您的服务器和开发机器上运行什么操作系统?还有文件系统? Windows 文件系统的权限以及所有者/组有时与 UNIX 文件系统上的相同文件不同。这可能是第一个绊脚石。

Bazaar 工作流程:

在存储库服务器上运行主树,并在本地进行签出:

bzr checkout sftp://path/to/repo/project /var/source/project

将签出本地分支/到您的开发环境:

bzr branch sftp://path/to/repo /var/www/project

不处理签出,仅在开发分支上工作。使用各种 bzr 命令在那里工作和提交。

一旦工作模块/错误修复/任务完成,合并(而不是推送)到主存储库中:

//In /var/source/project
bzr merge /var/www/project
//Resolve any conflicts
bzr resolve
//Commit the merge
bzr commit -m "Work module | task | bug fixed"

因为 /var/source/project 是签出的,所以存储库服务器上的存储库将自动更新。这使得两个或更多开发人员能够同时处理同一个项目,而无需一直推拉。

What operating system(s) do you run on the server and development machines? And file systems? Windows file systems' permissions and sometimes the owner / group sometimes differ from the same files on a unix file system. That might be the first stumbling block.

Bazaar workflow:

Run a main tree on the repo server, and do a checkout locally:

bzr checkout sftp://path/to/repo/project /var/source/project

Branch the checkout locally / to your dev environment:

bzr branch sftp://path/to/repo /var/www/project

Don't work on the checkout, only work on the dev branch. Work and commit there, using the various bzr commands.

Once a work module / bug fix / task is finished, merge (not push) into the main repo:

//In /var/source/project
bzr merge /var/www/project
//Resolve any conflicts
bzr resolve
//Commit the merge
bzr commit -m "Work module | task | bug fixed"

Because /var/source/project is a checkout, the repo on the repo server will be updated automatically. This enables two or more developers to work on the same project concurrently, without needing to push and pull the whole time.

凡尘雨 2024-10-25 05:14:27

我不确定您的提交消息如何更改所有权,如果您进行合并并提交,则新提交位于进行合并的人的名字下,但仍会跟踪原始提交。请参阅bzr log -n0

I'm not sure how your commit message changes ownership, if you do a merge and commit then the new commit is under the name of the guy who did the merge, but the original commits are still tracked. See bzr log -n0

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