【问题标题】:How do I install the hg-git plugin on Debian Stretch?如何在 Debian Stretch 上安装 hg-git 插件?
【发布时间】:2018-12-11 00:23:37
【问题描述】:

Debian Jessie 和 sid 都有一个 mercurial-git 软件包,其中包含 hg-git 插件。但是,这个包是(auto-)removed from Debian Stretch to to a release-critical bug

但是 - 我需要安装并运行它。这应该是可能的吧?

嗯,我按照plugin page上的安装说明:

  • 我跑了apt-get install python-setuptools python-setuptools-git python4-setuptools python3-setuptools-git
  • 我运行了easy_install hg-git,它似乎工作了

但是,当我运行各种 mercurial 操作时,我得到的第一行是错误消息:

*** failed to import extension hgext.git: No module named git

(不管我是否在做任何与 git 相关的事情。)

我的问题:

  1. 为什么会这样?
  2. 我需要做什么才能在 hggit 工作时消除错误消息?

现在,

How do I correctly install dulwich to get hg-git working on Windows?

【问题讨论】:

    标签: easy-install python-packaging mercurial-extension hg-git debian-stretch


    【解决方案1】:

    显然,该严重错误并不总是出现(并且可能仅在非常特定的情况下),因此您可以尝试安装Debian sid version of the mercurial-git package(即撰写本文时的版本 0.8.11-1)。有一个关于如何执行此操作的超级用户问题:

    https://linuxaria.com/howto/how-to-install-a-single-package-from-debian-sid-or-debian-testing

    在这种情况下,我的个人意见是简单地安装 .deb 文件,您可以从 here 获得该文件(它不是特定于平台的;在链接中您需要选择一个镜像。)这会导致错误消息消失,至少假设你有:

    [extensions]
    hgext.bookmarks =
    hggit = 
    

    在您的 ~/.hgrc 文件中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多