Bazaar新手关于存储库结构的问题

发布于 2024-08-19 12:30:50 字数 1431 浏览 6 评论 0原文

我想在 Windows XP 上使用 Bazaar 进行 Web 开发和相关任务。大多数文件在本地编辑,然后通过 FTP 传输到服务器。现在存储库位于我的本地工作站上。稍后应该与一些同事在本地共享。也许我们会使用本地Linux服务器作为集中存储库,但目前还没有决定这种结构。但首先我需要了解不同存储库设置的影响,而我根本不了解。

在 Windows XP 上使用 Bazaar-Explorer,我从某个位置 dev-filter/ 的 init-dialog 的选项列表创建了一个“共享树存储库”。 Bazaar Explorer 告诉我:

Created repository with treeless branches at F:/bzr.local/dev-filter 
Created branch at F:/bzr.local/dev-filter/trunk
Created working tree at F:/bzr.local/dev-filter/work

到目前为止还好。现在,我将一堆文件移动到工作目录中,并将它们添加并提交为 Rev 1“开始修订”。然后我处理其中一些文件并再次提交它们作为 Rev 2。我的困惑开始了。两个修订版本不应该都放入后备箱吗?主干仍然是空的,旁边的 .bzr 目录只保存一些管理信息。如果我删除我在第一次实验中尝试过的工作目录,那么一切都会消失。显然这些文件没有隐藏存储。

好的。也许我需要把它推到后备箱里?这也行不通。进入 work/ 目录并初始化“推送”到主干,Bazaar-Explorer 告诉我

No new revisions to push.

那又怎样?这看起来像是对我这边应该发生的事情的严重概念误解。

编辑,2010-02-03:一些结论

我同时学到的是:

  • 我认为我应该切换到命令行,直到我真正理解发生了什么,至少用于创建存储库和分支。 Bazaar Explorer 引入了一个新的抽象级别,只有当我理解下面的级别时,我才能处理它

  • 至少对我而言,使用 Bazaar 的秘诀之一是理解那些 .bzr 目录,它们的使用“bzr init”、“bzr init-repository”、“bzr Branch”等所有变体创建时的特定属性和状态以及它们如何组合在一起。

  • 虽然 Bazaar 用户指南中有整整一章“组织你的工作空间”,但它或多或少是面向工作流程的。该手册包含给定示例的许多目录结构。除此之外,我更喜欢但到目前为止还没有(或只是初步)发现的是那些“乐高式”.bzr 构建块的一些图形表示,它们创建了所有部件的链接。因此,我开始发明一些简单的符号,同时研究示例并查看 .bzr 目录,以记录其中存储的信息、它来自哪里、它如何链接以及链接到什么、它是完整的还是共享的等等。

埃里希·施赖伯

I want to use Bazaar on Windows XP for web-development and related tasks. Most of the files are edited locally and then transferred via FTP to the server. Just now the repository sits on my local workstation. Later on it should be shared locally with some co-workers. Perhaps we will use a local Linux server as a centralized repository, but this structure is not decided for now. But first I need to understand the impacts of the different repository setups, which I do not at all.

Using Bazaar-Explorer on Windows XP I’ve created a ‘shared tree repository’ from the option list of the init-dialogue in some location dev-filter/. Bazaar Explorer tells me:

Created repository with treeless branches at F:/bzr.local/dev-filter 
Created branch at F:/bzr.local/dev-filter/trunk
Created working tree at F:/bzr.local/dev-filter/work

OK so far. Now I move a bunch of files into the work directory and add and commit them as Rev 1 ‘Start Revision’. Then I work on some of these files and commit them again as Rev 2. Here my confusion starts. Shouldn’t both revisions go into the trunk? The trunk is still empty, beside the .bzr directory which only holds some management information. If I delete my working directory, which I have tried during these first experiments, everything is gone. There’s obviously no hidden storage of those files.

OK. Perhaps I need to push it into the trunk? This does not work either. Entering the work/ directory and initializing the ‘push’ to the trunk, Bazaar-Explorer tells me

No new revisions to push.

So what? This looks like a severe conceptual misunderstanding about what should happen on my side.

Edit, 2010-02-03: Some conclusions

What I learned meanwhile is this:

  • I think I should switch to the command line until I really understand what’s going on, at least for creating the repositories and branches. Bazaar Explorer introduces a new level of abstraction which I only can handle if I understand the level beneath

  • One of the secrets of working with Bazaar at least for me is to understand those .bzr directories, their particular properties and states when created with ‘bzr init’, ‘bzr init-repository’, ‘bzr branch’ etc. in all their variants and how they are plumped together.

  • While there’s a whole chapter of ‘Organizing your workspace’ in the Bazaar User Guide, it’s more or less workflow oriented. The manual contains a lot of directory structures for the given examples. What I would prefer beside this and have not (or only rudimentary) found so far is some graphical representation of those ‘Lego like’ .bzr building blocks which create the linking of all the parts. So I started to invent some simple notation while working through the examples and looking into the .bzr directories to document what information is stored there, where does it come from, how and to what is it linked, is it complete or shared, etc.

Erich Schreiber

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

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

发布评论

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

评论(3

抚你发端 2024-08-26 12:30:50

使用无树创建存储库
分支位于 F:/bzr.local/dev-filter

这部分输出对我来说看起来很可疑。您确定在初始化对话框中选择了“共享存储库”而不是“具有无树分支的共享存储库”吗?

无树分支是没有工作树的分支,如果您确实为主干创建了无树分支,那么那里没有文件是有道理的。

Created repository with treeless
branches at F:/bzr.local/dev-filter

This part of the output looks suspicious to me. Are you sure you chose 'Shared repository' and not 'Shared repository with treeless branches' from the init dialog?

Treeless Branches are branches without the working tree, if you indeed created a treeless branch for trunk then it makes sense that there are no files there.

零崎曲识 2024-08-26 12:30:50

您的更改仍然保存在 F:/bzr.local/dev-filter/trunk/.bzr 中,并且确实已在那里提交。您看不到这些更改反映在文件系统中,因为 Bazaar 将主干创建为无树分支,并使用 `` 作为轻量级签出。请参阅结账集市用户参考。

如果您在 Bazaar Explorer 中打开 F:/bzr.local/dev-filter/trunk,您应该会看到您的修订。如果您使用工作树创建新分支或基于主干进行结帐,Bazaar 将为您创建包含更改的文件。

Your changes are still saved in the F:/bzr.local/dev-filter/trunk/.bzr, and have indeed been committed there. You don't see those changes reflected in the file system because Bazaar has created trunk as a treeless branch, with `` as a lightweight checkout. See checkouts in the Bazaar User Reference.

If you open F:/bzr.local/dev-filter/trunk in Bazaar Explorer, you should see your revisions. If you create a new branch with a working tree or checkout based on trunk, Bazaar will create the files with your changes for you.

初吻给了烟 2024-08-26 12:30:50

通常情况是这样的。

bzr init-repo --no-trees F:/bzr.local/dev-filter
cd F:/bzr.local/dev-filter
bzr 初始化主干
bzr 分支主干工作

---以上所有内容都不会创建任何树

现在在新目录中,例如 F:\temp
cd F:\临时
bzr 结账 F:/bzr.local/dev-filter/work

添加
bzr commit

---回到F:/bzr.local/dev-filter/work
cd F:/bzr.local/dev-filter/work
bzr推送 F:/bzr.local/dev-filter/trunk

typically it goes like this.

bzr init-repo --no-trees F:/bzr.local/dev-filter
cd F:/bzr.local/dev-filter
bzr init trunk
bzr branch trunk work

---all above will not create any tree

Now in new directory say F:\temp
cd F:\temp
bzr checkout F:/bzr.local/dev-filter/work

bzr add
bzr commit

---back to F:/bzr.local/dev-filter/work
cd F:/bzr.local/dev-filter/work
bzr push F:/bzr.local/dev-filter/trunk

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