mercurial - 如何从 Bitbucket 存储库中检索可用分支?

标签 mercurial bitbucket

可以使用 hg branches 从本地存储库检索本地分支。是否也可以通过编程方式使用远程存储库执行此操作?

最佳答案

不幸的是,如果不拉入存储库,则无法确定远程 Mercurial 存储库中的分支。您可以避免将数据保存在磁盘上,方法是使用 hg incoming 获取您想要的信息,但无论如何该命令都会提取整个存储库数据——可能不是您想要的。不幸的是,您最好的选择可能只是执行 checkout ,然后查询您现在的本地存储库。

如果这真的不能接受,您还有两个额外的解决方案:您可以使用像 BeautifulSoup 这样的工具对存储库的 Bitbucket 页面进行屏幕换图。或 lxml ,或者您可以等到 Bitbucket 发布他们的 API,这可能会提供此功能。

关于mercurial - 如何从 Bitbucket 存储库中检索可用分支?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/797010/

相关文章:

windows - 如何让 Windows 上的 Mercurial 使用 SSH key 进行推/拉?

windows-7 - TortoiseHg:覆盖图标问题(Windows)?

mercurial - 位桶, "hg push"和 "hg update"

git - NPM 包 url 作为 mercurial(bitbucket) 中的依赖项

git - 如何从 jenkins 登录到 git bitbucket 存储库

macos - 混帐桶 : error: Your local changes to the following files would be overwritten by merge

git - 您的 BitBucket 帐户可以有多少空间?

git - Mercurial : "invalid-email-address" at GitHub

git - 无法连接到 bitbucket.org 端口 443 : No route to host

Windows 中的 Git 克隆比在 Linux 中慢得多