To get a list of changes, this answer gives the command line:
hg status --change REV
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
Why can't we specify both rev and change?
In answer to another recent question, I posted:
client.status(rev=[start, end], modified=True, added=True)
This works, but I was wondering why the other doesn't. What am I missing?
hg status --change REVonly specifies the--changeflag, not the--revflag.The
--change REVoption displays the changes introduced with changesetREV. The--rev REVoptions displays the changes between the changesetREVand the working directory.If you try
hg status --change REVx --rev REVy, you'll have the same error that you see withclient.status(rev=-1, change=True)Both thechangeandrevoptions take changesets as parametersNote that
--modifiedis different to--change REV- the filters the output to show modified files only.