martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Funnily enough, within about a day of writing
https://phab.mercurial-scm.org/D3144, I ran into the
exception in practice. I spent some time trying figure out why I got
the "unknown revision" message when the node was clearly in the repo,
and then I finally remembered that I had just fixed that bug. Anyway,
even with the fix applied, the message wasn't ideal: now it would
instead be something like "abort: hidden revision 'K*}s!", because the
error message didn't go through the conversion to hex that happens at
the end of the try-block. Let's fix that by converting to hex before
re-raising.
(I included example output in https://phab.mercurial-scm.org/D3144, which is
apparently incorrect. I
suppose that must have been produced when the patch was later in my
stack of unsent patches, before I rebased it and sent it. Sorry about
that.)
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3185
AFFECTED FILES
mercurial/context.py
CHANGE DETAILS
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -411,6 +411,7 @@
self._rev = repo.changelog.rev(changeid)
return
except error.FilteredLookupError:
+changeid = hex(changeid) # for the error message
raise
except LookupError:
pass
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel