阻止 Bazaar (bzr) 制作 .moved 文件
有没有办法告诉 bzr
不要创建 .moved
文件?我已尝试使用 bzr pull
来使用 --overwrite
选项,但它仍然会创建 .moved 文件。我想我可以制作一个清理脚本,但我只是想知道我是否遗漏了一些东西。
Is there a way to tell bzr
not to create .moved
files? I've tried the --overwrite
option with a bzr pull
, but it still creates the .moved files. I guess I can just make a clean-up script, but I was just wondering if I am missing something.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在某些文件名中存在冲突:要么您的树中有未版本化的 foo,并且您在 foo 版本化的地方拉取修订版,要么您在两个不同的分支中独立添加了 foo,因此 foo 的每个副本都被分配了不同的文件 ID。因此,Bazaar 会尝试将您的文件保存在那里,并避免覆盖您现有的文件。在第一种情况下,您可以从 bzr 获得无害的备份工具,并且可以删除 foo.moved。但在第二种情况下,您会遇到真正的冲突,您至少应该检查 foo 和 foo.moved 并使用
bzrsolve foo
解决冲突,然后根据需要删除 foo.moved。因此,避免 .moved 文件的策略很大程度上取决于它们出现在树中的原因。
You have conflicts in some filenames: either you have unversioned foo in your tree and you pull revision where foo becomes versioned, or you have added foo in two different branches independently and therefore each copy of foo got assigned different file-ids. So Bazaar tries to save your files there and avoid overwrite your existing files. In the first case you have harmless backup facility from bzr, and foo.moved can be deleted. But in the second case you have real conflict and you should at least inspect both foo and foo.moved and resolve conflict with
bzr resolve foo
, then delete foo.moved if needed.So the strategy to avoid .moved files is pretty much depend on the reason why they are appear in your tree.