Bug 2921 - qimport mangling url
Summary: qimport mangling url
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: urgent bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-25 16:34 UTC by Rob Campbell
Modified: 2012-05-13 05:01 UTC (History)
7 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Campbell 2011-07-25 16:34 UTC
qimport patches from our bugzilla instance is returning the incorrect contents.

E.g., 

hg qimport -n aname "https://bugzilla.mozilla.org/attachment.cgi?id=546853"

will return that page minus the ?id=546853 portion of the URL.
Comment 1 Gavin Sharp 2011-07-25 16:46 UTC
I bisected hg-stable:

The first bad revision is:
changeset:   13896:bf6156bab41b
user:        Brodie Rao <brodie@bitheap.org>
date:        Wed Mar 30 20:01:34 2011 -0700
summary:     url: use url.url in url.open()
Comment 2 Gavin Sharp 2011-07-25 19:41 UTC
The issue appears to be with util.py's url class, which ends up encoding the
"=" in the query string incorrectly when stringifying - in the example, we
end up trying to load "https://bugzilla.mozilla.org/attachment.cgi?id%3D546853".
Comment 3 Benoit Boissinot 2011-07-31 11:56 UTC
I'll take a look.
Comment 4 HG Bot 2011-08-01 10:00 UTC
Fixed by http://selenic.com/repo/hg/rev/e6730f9e13bc
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
url: store and assume the query part of an url is in escaped form (issue2921)

(please test the fix)
Comment 5 Bugzilla 2012-05-12 09:22 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:22 EDT  ---

This bug was previously known as _bug_ 2921 at http://mercurial.selenic.com/bts/issue2921