Labels: Type-Defect Priority-Medium
New issue 2492 by dshpekto...@gmail.com: HgWebClient.cat_file is broken: it
returns valid data for missing files
* NOTE: Do not post confidential information in this bug report. *
* If you need immediate support, please contact *
* reviewbo...@googlegroups.com *
What version are you running?
What's the URL of the page containing the problem?
What steps will reproduce the problem?
1. clone upstream mercurial repository
2. add a commit, but don't push it
3. do 'hg postreview tip'
4. try to 'View Diff' on the draft review page
What is the expected output? What do you see instead?
Expected to see API reject the patch mentioning non-existent commit (it's
not in upstream, remember?) and, thus, expected postreview to fail.
But instead postreview is successful, but diff page shows a trace saying it
can't apply the patch
What operating system are you using? What browser?
Debian Linux, Iceweasel (a.k.a Firefox)
Please provide any additional information below.
Basically, the that newly created commit isn't present in upstream and thus
reviewboard cannot properly fetch 'raw-file/NEW_REVISION/path/to/file'.
That's OK, given the fact that it's _my_ error to post a review for a
commit not present in upstream. But here's the glitch: somewhere under the
hood an arbitrary file is actually fetched, but it's not the expected file
and patching fails.
I've traced the source to HgWebClient.cat_file('path/to/file',
rev=>'NEW_REVISION'), which succeeds and instead of the requested file or
HTTP404 returns a summary page, which is wrong.
for rawpath in ["raw-file", "raw"]:
full_url = ''
returns proper HTTP404 for "raw-file" iteration, but for "raw" it succeeds
and return contents of a summary web-page.
You received this message because you are subscribed to the Google Groups
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to
For more options, visit this group at