gpt4 book ai didi

python - 帮助我使用 mercurial 扩展 exportfiles

转载 作者:太空宇宙 更新时间:2023-11-03 13:51:51 26 4
gpt4 key购买 nike

我正在尝试使用 exportfiles mercurial 的扩展,但我收到此错误:

c:\xampp\htdocs\dev>hg exportfiles -r 1 /tmp/export
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
** Mercurial Distributed SCM (version 1.9+10-e9264b45237d)
** Extensions loaded: exportfiles
Traceback (most recent call last):
File "hg", line 42, in <module>
File "mercurial\dispatch.pyo", line 27, in run
File "mercurial\dispatch.pyo", line 64, in dispatch
File "mercurial\dispatch.pyo", line 87, in _runcatch
File "mercurial\dispatch.pyo", line 675, in _dispatch
File "mercurial\dispatch.pyo", line 454, in runcommand
File "mercurial\dispatch.pyo", line 729, in _runcommand
File "mercurial\dispatch.pyo", line 683, in checkargs
File "mercurial\dispatch.pyo", line 672, in <lambda>
File "mercurial\util.pyo", line 385, in check
File "C:\Users\Sasa/exportfiles.py", line 39, in exportfiles
rng = cmdutil.revrange(repo, opts['rev'])
AttributeError: 'module' object has no attribute 'revrange'

我正在使用 TortiseHG 2.1.1 for Windows 32-bit 和 Mercurial 1.9+10

你能帮我解决这个问题并使用 exportfiles 扩展名吗?

提前致谢!

最佳答案

Mercurial's API changed after version 1.8.

Various functions have been moved from cmdutil.py to scmutil.py, including revrange/revsingle/revpair and match/matchall/matchfiles

假设this是您正在使用的扩展的来源,第 11 行应该是

from mercurial import util, scmutil

第39行应该是

rng = scmutil.revrange(repo, opts['rev'])

关于python - 帮助我使用 mercurial 扩展 exportfiles,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6734810/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com