Commit 45e331dd authored by Matt Harbison's avatar Matt Harbison
Browse files

visdiff: use scmutil.revsymbol() to resolve --change

I triggered this by accidentally double clicking a file in the shelved half of
the shelf widget:

    Traceback (most recent call last):
      File "tortoisehg\hgqt\chunks.pyo", line 166, in vdiff
      File "tortoisehg\hgqt\visdiff.pyo", line 216, in visualdiff
      File "tortoisehg\hgqt\thgrepo.pyo", line 772, in __getitem__
      File "mercurial\localrepo.pyo", line 856, in __getitem__
      File "mercurial\context.pyo", line 439, in __init__
    ProgrammingError: unsupported changeid 'patch' of type <type 'str'>

Now it pops up a message saying 'Unable to find changeset'.  Oddly, the value of
--change in this case is 'patch', and I wasn't able to trigger this with visual
diff.

--HG--
branch : stable
parent d0b9d1e4a59b
......@@ -213,7 +213,7 @@ def visualdiff(ui, repo, pats, opts):
try:
ctx1b = None
if change:
ctx2 = repo[change]
ctx2 = scmutil.revsymbol(repo, change)
p = ctx2.parents()
if len(p) > 1:
ctx1a, ctx1b = p
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment