Bazaar (bzr) 预定义位置
Bazaar 有一个 Launchpad 伪协议(lp:),它使用户能够在远程分支中进行操作,而无需编写完整的 Launchpad 位置,我正在寻找一种以如下方式创建自己的伪协议的方法(类似于 GIT):
bzr remote my sftp://[email protected]/home/myuser/myrepo/
bzr push my:mybranch
bzr push my:otherbranch
bzr push my:anotherbranch
...而不是...
bzr push sftp://[email protected]/home/myuser/myrepo/mybranch
bzr push sftp://[email protected]/home/myuser/myrepo/otherbranch
bzr push sftp://[email protected]/home/myuser/myrepo/anotherbranch
...那真是令人痛苦。
我读过有关 bazaar.conf 的内容,但似乎只能为每个分支/存储库设置全局推送位置。我看到的另一种方法是使用别名,但有同样的问题,当需要创建新分支时非常难看。
是否可以在不修改 BZR 代码的情况下做到这一点?这应该是显而易见的...
Bazaar has a Launchpad pseudo-protocol (lp:) that able the user to operate in remote branchs without write full Launchpad location, I'm searching a way to create my own pseudo-protocols in a way like this (similar to GIT):
bzr remote my sftp://[email protected]/home/myuser/myrepo/
bzr push my:mybranch
bzr push my:otherbranch
bzr push my:anotherbranch
...instead of...
bzr push sftp://[email protected]/home/myuser/myrepo/mybranch
bzr push sftp://[email protected]/home/myuser/myrepo/otherbranch
bzr push sftp://[email protected]/home/myuser/myrepo/anotherbranch
...that is a pain in the ass.
I readed about bazaar.conf but it seems only able you to set a globals push locations for each branch/repo. Another way I saw is to use alias, but has the same problem, is very ugly when is needed to create new branches.
Is posible to do this without modify the BZR code? This should be obvious...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
my:xxx 语法在 bzr 中称为
目录服务
。您可以通过插件定义自己的目录服务(用Python编写)。此类插件的一个很好的例子是书签插件。检查一下。
也许这个插件本身就足以满足您的需求。
The my:xxx syntax called
directory services
in bzr. You can define your own directory service via plugin (write in Python).Good example of such plugins is bookmark plugin. Check it.
Maybe this plugin itself will be enough for your needs.
解决方案是将 bzr-bookmark 插件安装为 ~/.bazaar/plugins/bookmarks,然后:
The solution is install bzr-bookmark plugin as ~/.bazaar/plugins/bookmarks, then: