为什么hglib不允许状态为修订和更改? [英] Why does hglib not allow status for a revision and changes?

查看:106
本文介绍了为什么hglib不允许状态为修订和更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要获取更改列表,请此答案给出命令行:

To get a list of changes, this answer gives the command line:

hg status --change REV

但是使用 hglib 调用 status 会出现错误:

But calling status using hglib gives an error:

>>> client.status(rev=-1, change=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\asdf\envs\stackoverflow\lib\site-packages\hglib\client.py", line 1384, in status
    raise ValueError('cannot specify both rev and change')
ValueError: cannot specify both rev and change

为什么不能同时指定revchange?

Why can't we specify both rev and change?

回答这行得通,但是我想知道为什么其他人不行.我想念什么?

This works, but I was wondering why the other doesn't. What am I missing?

推荐答案

hg status --change REV仅指定--change标志,而不指定--rev标志.

hg status --change REV only specifies the --change flag, not the --rev flag.

--change REV选项显示更改集REV引入的更改. --rev REV选项显示更改集REV和工作目录之间的更改.

The --change REV option displays the changes introduced with changeset REV. The --rev REV options displays the changes between the changeset REV and the working directory.

如果尝试使用hg status --change REVx --rev REVy,则会遇到与client.status(rev=-1, change=True)相同的错误,同时changerev选项都将变更集作为参数

If you try hg status --change REVx --rev REVy, you'll have the same error that you see with client.status(rev=-1, change=True) Both the change and rev options take changesets as parameters

请注意,--modified--change REV不同-过滤输出以仅显示修改后的文件.

Note that --modified is different to --change REV - the filters the output to show modified files only.

这篇关于为什么hglib不允许状态为修订和更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆