Fix handling of --rev when using hg diff --since-last-submit-o2

Summary: Second-order diff was hardcoded to use "." even if another rev was specified on the CLI.

Reviewed By: shashkambh

Differential Revision: D10212547

fbshipit-source-id: b9867ba3e2141ee3c9a8c67a83e9c039da2abf41
This commit is contained in:
Jacob Bower 2018-10-04 19:01:26 -07:00 committed by Facebook Github Bot
parent c1729ce764
commit a2c598e9ba

View File

@ -183,7 +183,7 @@ def _diff(orig, ui, repo, *pats, **opts):
pats = tuple(os.path.join(repo.root, p) for p in prev | curr)
if opts.get("since_last_submit_2o"):
return _diff2o(ui, repo, rev, ".", **opts)
return _diff2o(ui, repo, rev, targetrev, **opts)
else:
return orig(ui, repo.unfiltered(), *pats, **opts)