如何将 bitbucket 存储库与托管的 FogBugz 按需版本集成?

发布于 2024-07-05 03:23:33 字数 235 浏览 16 评论 0原文

我使用 FogBugz 的按需(托管)版本。 我想开始使用 Mercurial 进行源代码控制。 我想集成 FogBugz 和 BitBucket 存储库。 我尝试了一下,但事情进展得不太顺利。

FogBugz 要求您将 Mercurial 客户端连接到fogbugz.py python 脚本。 TortoiseHg 似乎没有他们在说明中引用的 hgext 目录。

那么有人成功做过类似的事情吗?

I use the on-demand (hosted) version of FogBugz. I would like to start using Mercurial for source control. I would like to integrate FogBugz and a BitBucket repository.
I gave it a bit of a try but things weren't going very well.

FogBugz requires that you hook up your Mercurial client to a fogbugz.py python script. TortoiseHg doesn't seem to have the hgext directory that they refer to in instructions.

So has anyone successfully done something similar?

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

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

发布评论

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

评论(4

养猫人 2024-07-12 03:23:33

事后分析:

Bitbucket 现在拥有原生的fogbugz 支持以及其他回发服务。

http://www.bitbucket.org/help/service-integration/

Post-mortem:

Bitbucket now has native fogbugz support, as well as other post-back services.

http://www.bitbucket.org/help/service-integration/

丘比特射中我 2024-07-12 03:23:33

从它的声音来看,您希望在本地计算机上运行该钩子。 挂钩和说明旨在用于中央服务器。

如果您是唯一在存储库中工作的人,或者不介意提交在执行拉取之后才显示在 FB 中,那么您可以将钩子本地添加到您的主克隆,如果您正在使用主克隆,那么您需要做一些与他们在这里所说的略有不同的事情:
http://bugs.movabletype.org/help/topics/sourcecontrol/ setup/Mercurial.html

你可以把你的fogbugz.py放在你想要的任何地方,只需在存储库hgrc文件的[fogbugz]部分添加一个路径行:

[fogbugz]
path=C:\Program Files\TortoiseHg\scripts\fogbugz.py

只需确保你已经安装了python。 您可能还希望添加一个提交挂钩,以便对存储库的本地提交也进入 FB。

[hooks]
commit=python:hgext.fogbugz.hook
incoming=python:hgext.fogbugz.hook

在 Fogbugz 安装中,您需要更改将以下内容放入您的日志 url:

^REPO/log/^R2/^FILE

以及您的 diff url:

^REPO/diff/^R2/^FILE

当钩子脚本运行时,它会连接到您的 FB 安装并向其发送一些参数。 这些参数存储在数据库中,并用于生成差异和日志信息的 URL。 该脚本发送存储库的 url,这是在 [web] 部分中的 baseurl 设置中。 您希望此 url 成为您的 bitbucket 存储库的 url。 这将用于替换上面 URL 模板中的 ^REPO。 挂钩脚本还将修订 ID 和文件名传递给 FB。 这些将取代 ^R2 和 ^FILE。 总之,这是您想要添加到 .hg 目录中的 hgrc 文件中的内容:

[extensions]
hgext.fogbugz=

[fogbugz]
path=C:\Program Files\TortoiseHg\scripts\fogbugz.py
host=https://<YOURACCOUNT>.fogbugz.com/
script=cvsSubmit.asp

[hooks]
commit=python:hgext.fogbugz.hook
incoming=python:hgext.fogbugz.hook

[web]
baseurl=http://www.bitbucket.org/<YOURBITBUCKETACCOUNT>/<YOURPROJECT>/

需要记住的一件事是,在您实际将这些更改推送到 bitbucket 之前,FB 可能会收到签入通知。 如果这是原因,请推动一下,事情就会成功。

编辑:添加了有关 FB 服务器和摘要的部分。

From the sounds of it you are wanting to run the hook on your local machine. The hook and directions are intended for use on the central server.

If you are the only one working in your repository or don't mind commit not showing up in FB until after you do a pull, then you can add the hook locally to your primary clone, If you are using your primary clone then you need to do something slightly different from what they say here:
http://bugs.movabletype.org/help/topics/sourcecontrol/setup/Mercurial.html

You can put your fogbugz.py anywhere you want, just add a path line to your [fogbugz] section of that repositories hgrc file:

[fogbugz]
path=C:\Program Files\TortoiseHg\scripts\fogbugz.py

Just make sure you have python installed. you may also wish to add a commit hook so that local commits to the repository also get into FB.

[hooks]
commit=python:hgext.fogbugz.hook
incoming=python:hgext.fogbugz.hook

On the Fogbugz install you will want change put the following in your for your logs url:

^REPO/log/^R2/^FILE

and the following for your diff url:

^REPO/diff/^R2/^FILE

When the hook script runs it connects to your FB install and sends it a few parameters. These parameters are stored in the DB and used to generate urls for diffs and log informaiton. The script sends the url of repo, this is in your baseurl setting in the [web] section. You want this url to be the url to your bitbucket repository. This will be used to replace ^REPO from the url templates above. The hook script also passes the revision id and the file name to FB. These will replace ^R2 and ^FILE. So in summary this is the stuff you want to add to the hgrc file in your .hg directory:

[extensions]
hgext.fogbugz=

[fogbugz]
path=C:\Program Files\TortoiseHg\scripts\fogbugz.py
host=https://<YOURACCOUNT>.fogbugz.com/
script=cvsSubmit.asp

[hooks]
commit=python:hgext.fogbugz.hook
incoming=python:hgext.fogbugz.hook

[web]
baseurl=http://www.bitbucket.org/<YOURBITBUCKETACCOUNT>/<YOURPROJECT>/

One thing to remember is that FB may get notified of a checkin before you actually push those changes to bitbucket. If this is the cause do a push and things will work.

EDIT: added section about the FB server and the summary.

绅士风度i 2024-07-12 03:23:33

请注意:Fog Creek 发布了 Kiln,它提供了与 FogBugz 紧密集成的 Mercurial 托管,并且不需要任何配置。

我通常不会在 Stack Overflow 上“做广告”(免责声明:我是 Kiln 开发人员之一),但我觉得这直接回答了最初的问题。

Just a heads-up: Fog Creek has released Kiln which provides Mercurial hosting that's tightly integrated with FogBugz and doesn't require any configuration.

I normally wouldn't "advertise" on Stack Overflow (disclaimer: I'm one of the Kiln devs), but I feel that this directly answers the original question.

风吹短裙飘 2024-07-12 03:23:33

可以将 GIT BitBucket 存储库与 FogBugz 问题跟踪器集成,但不幸的是它没有正确记录。

您必须按照 https://confluence.atlassian.com/display/ 中描述的步骤操作BITBUCKET/FogBugz+Service+Management,但请注意

  1. 在 CVSSubmit URL 中,您需要输入不带“?ixBug=bugID&sFile=file&sPrev=x&sNew=y&ixRepository=”参数的 url。

    它应该只是“https://your_repo.fogbugz.com/cvsSubmit.asp”

  2. 您需要在 git 提交消息中提及您的 FogBugz 案例 ID
    通过将“BugzID:ID”字符串放入其中(这没有记录
    任何地方:-( ) 类似于:

    git commit -m "这是一个出色的提交,解决了案例 BugzID: 42"

当然,提交信息将在您将提交推送到 BitBucket 服务器之后发送到 FogBugz,而不是在您执行本地提交。

It is possible to integrate your GIT BitBucket repository with FogBugz issue tracker, but unfortunately it is not properly documented.

You have to follow steps described at https://confluence.atlassian.com/display/BITBUCKET/FogBugz+Service+Management, but beware that

  1. In CVSSubmit URL you need to put url WITHOUT "?ixBug=bugID&sFile=file&sPrev=x&sNew=y&ixRepository=" parameters.

    It should just be "https://your_repo.fogbugz.com/cvsSubmit.asp"

  2. You will need to mention your FogBugz case ID in the git commit message
    by putting "BugzID: ID" string in it (this is not documented
    anywhere :-( ) similar to this:

    git commit -m "This is a superb commit which solves case BugzID: 42"

Of course, commit info will be sent to FogBugz after you push your commit to BitBucket server, not after your do a local commit.

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