TortoiseHg 和多个标签

发布于 2024-12-22 04:52:25 字数 119 浏览 2 评论 0原文

是否可以使用 TortoiseHg 为提交分配多个标签?目前,我只能为特定提交设置一个标签,看起来 TortoiseHg 不允许使用多个标签。那么,某一特定提交是否可以有多个标签?如果是这样,怎么办?

谢谢。

Is it possible to assign multiple tags to commits using TortoiseHg? Currently, I can set only one tag to a particular commit, Looks like TortoiseHg doesn't allow more than one tag. So, is it possible to have more than one tag for a particular commit? and if so, how?

Thanks.

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

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

发布评论

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

评论(2

梦途 2024-12-29 04:52:25

TortoiseHG 绝对支持这一点。
我刚刚用 v 2.0.4 尝试过:

一次提交上有两个标签

到底是什么让你认为 TortoiseHG 不支持这个?
当您尝试时是否收到错误消息?

您使用的是哪个版本的 TortoiseHg?也许您使用的是旧版本,他们后来添加了此功能?尝试升级到当前版本。


编辑:

Davita,现在我明白你的问题了。
你是对的,当你右键单击提交时,你只能在标签窗口中输入一个标签。
技巧是您需要连续多次打开标签窗口:

  • 右键单击提交并选择“标签”,
  • 在窗口中输入“第一个标签”并保存
  • 右键单击提交并再次选择“标签”< /strong>
  • 在窗口中输入“第二个标签”并保存

TortoiseHG definitely supports this.
I just tried it with v 2.0.4:

two tags on one commit

What exactly makes you think TortoiseHG doesn't support this?
Do you get an error message when you try it?

Which version of TortoiseHg are you using? Maybe you're using an older version and they added this feature later? Try upgrading to the current version.


EDIT:

Davita, now I understand your problem.
You are right, when you right-click on the commit, you can only enter one tag in the tag window.
The trick is that you need to open the tag window several times in a row:

  • right click the commit and select "Tag"
  • enter "first tag" into the window and save
  • right click the commit and select "Tag" again
  • enter "second tag" into the window and save
趴在窗边数星星i 2024-12-29 04:52:25

我的解决方案并不完全是用户友好的,而是对回购更加友好。

我使用文本编辑器打开“.hgtags”文件,并通过 HGWorkbench 复制提交哈希,并将其粘贴到新行中,后跟标签名称。如果我想为同一提交添加新标签,请使用不同的标签名称执行相同操作。

就像

c03d4783349be42b34732bef43fbd6315687bc54 SuperCoolTag
c03d4783349be42b34732bef43fbd6315687bc54 AnotherSuperCoolTag

使用这种方法,您可以在一次提交中向多个提交添加多个标签。

如果添加如下所示的行,您将拥有用于第一次和第二次提交的标签以及用于第三次提交的三个标签。

da977229def08ae393c48b0b4239118fd31dbe68 TAG-01
d42f2d88057f115e4f53e0f691465fec69264507 TAG-02
1e3e8603aadb08792dd7a43d6859b2e239597c4b TAG-03
1e3e8603aadb08792dd7a43d6859b2e239597c4b TAG-04
1e3e8603aadb08792dd7a43d6859b2e239597c4b TAG-05

我在 HGWorkbench 标签窗口中尝试了一些方法来执行相同的操作,但没有一个起作用。

My solution is not exactly user-friendly, but instead a bit more repo-friendly.

I'm opening ".hgtags" file with a text editor and copying the commit hash via HGWorkbench and pasting it to a new line following with the tag name. If I want to add a new tag for the same commit, do the same with a different tag name.

It's like

c03d4783349be42b34732bef43fbd6315687bc54 SuperCoolTag
c03d4783349be42b34732bef43fbd6315687bc54 AnotherSuperCoolTag

With this method you can add multiple tags to multiple commits in just one commit.

If you add lines like below, you'll have a tag for the first and second commit and three tags for the third commit.

da977229def08ae393c48b0b4239118fd31dbe68 TAG-01
d42f2d88057f115e4f53e0f691465fec69264507 TAG-02
1e3e8603aadb08792dd7a43d6859b2e239597c4b TAG-03
1e3e8603aadb08792dd7a43d6859b2e239597c4b TAG-04
1e3e8603aadb08792dd7a43d6859b2e239597c4b TAG-05

I tried some methods within the HGWorkbench Tag Window to do the same, but none of them worked.

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