Benoit Boissinot
bb6f91a4eb
http: len(x) fails if it doesn't fit into an int, use __len__() instead
...
len(x) raises OverflowError if it's bigger than 2**31-1, we need to call
__len__() ourself instead.
2010-02-17 11:00:48 +01:00
Matt Mackall
8d99be19f0
many, many trivial check-code fixups
2010-01-25 00:05:27 -06:00
Matt Mackall
cd3ef170f7
Merge with stable
2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424
Update license to GPLv2+
2010-01-19 22:20:08 -06:00
Sune Foldager
a2d25fc09b
branchmap: fix defective fallback fix a3d9c67908ca
...
The fix applied as a3d9c67908ca doesn't work and is essentially a no-op.
This fix also adds a comment about the nature of the problem, and a test.
2009-11-18 15:20:08 +01:00
Henrik Stuart
1d4d06ceca
support encoding fallback in branchmap to maintain compatibility with 1.3.x
2009-11-16 13:35:36 +01:00
Jesse Glick
7656a30c59
Sometimes pushing to an HTTP repo fails with a useless message.
...
abort: 'https://.../.../ ' does not appear to be an hg repository!
Ought to produce a better diagnostics on the client. With patched 1.3.1,
observed to produce an Apache HTML error message (from cgitb) including the
vital text:
File ".../hgwebdir.cgi", line 70, in ?
wsgicgi.launch(application)
File "mercurial/hgweb/wsgicgi.py", line 68, in launch
File "mercurial/hgweb/hgwebdir_mod.py", line 91, in __call__
File "mercurial/hgweb/hgwebdir_mod.py", line 148, in run_wsgi
File "mercurial/hgweb/hgweb_mod.py", line 100, in run_wsgi
File "mercurial/hgweb/protocol.py", line 156, in unbundle
File "mercurial/localrepo.py", line 2031, in addchangegroup
File "mercurial/revlog.py", line 1204, in addgroup
LookupError: 00manifest.i@......: unknown parent
Might also be helpful if server's hgweb_mod.run_wsgi caught unexpected errors
and returned a well-formed error response including the stack trace. The client
patch would still be useful in this case, because it would let you diagnose
issues with HTTP proxy servers and so on.
2009-10-17 14:00:41 -04:00
Martin Geisler
9f1896c083
do not attempt to translate ui.debug output
2009-09-19 01:15:38 +02:00
Henrik Stuart
a4975b3627
named branches: client branchmap wire protocol support (issue736)
...
Co-contributor: Sune Foldager <cryo@cyanite.org>
2009-05-23 17:03:51 +02:00
Steve Borho
01beb4abff
httprepo: always store the response url (issue1968)
...
Fixes a regression caused by e52456aeb2b0
2010-01-05 10:20:28 -06:00
Dan Villiom Podlaski Christiansen
892998bd5c
httprepo: suppress the `real URL is...' message in safe, common cases.
...
When the actual and requested URL only differ by trailing slashes,
there is no need to warn. As an example, this easily happens when
accessing repositories on Bitbucket over HTTP(S).
As far as I could tell, there were no existing tests for this
behaviour.
2009-11-18 12:47:58 +01:00
Simon Heimberg
09ac1e6c92
separate import lines from mercurial and general python modules
2009-04-28 17:40:46 +02:00
Martin Geisler
750183bdad
updated license to be explicit about GPL version 2
2009-04-26 01:08:54 +02:00
Matt Mackall
de487eacda
ui: print_exc() -> traceback()
2009-04-26 16:50:44 -05:00
Martin Geisler
1deb417a82
util: use built-in set and frozenset
...
This drops Python 2.3 compatibility.
2009-04-22 00:55:32 +02:00
Patrick Mezard
6e39e5470b
Merge with crew-stable
2009-04-13 14:36:55 +02:00
Patrick Mezard
b41a06764a
httprepo: hide password in debug traces too
2009-04-13 14:33:47 +02:00
Steve Borho
7d99d0a5a5
hide passwords in httprepo error messages
2009-04-11 18:34:21 -05:00
Martin Geisler
2d9bab6890
httprepo: lowercase debug output
2009-03-29 21:52:43 +02:00
Steve Borho
506abe9706
close sockets on httprepository deletion (issue1487)
...
With this destructor in place, I no longer see tracebacks
on the server after using win32 clients for pull, push, etc.
2009-01-28 20:06:59 -06:00
Matt Mackall
534da54d07
error: move UnexpectedOutput (now ResponseError)
2009-01-12 11:28:28 -06:00
Matt Mackall
e0735a1762
error: move repo errors
...
rename NoCapability to CapabilityError
2009-01-12 10:42:31 -06:00
Matt Mackall
e91df23e48
protocol: avoid sending outrageously large between requests
2008-11-07 15:30:25 -06:00
Benoit Boissinot
ea7fe6dacc
remove unused variables
2008-10-28 19:25:26 +01:00
Benoit Boissinot
2914e4c487
Fix https availability checking
...
thanks to Augie Fackler for noticing it.
2008-10-28 19:07:14 +01:00
Benoit Boissinot
214af7ec3c
factor out the url handling from httprepo
...
Create url.py to handle all the url handling:
- proxy handling
- workaround various python bugs
- handle username/password embedded in the url
2008-10-27 21:50:01 +01:00
Benoit Boissinot
cd80319bc5
httprepo: factor out proxy handling
2008-10-27 17:48:05 +01:00
Matt Mackall
e617903e64
Autodetect static-http
2008-10-22 15:41:32 -05:00
Benoit Boissinot
d4f73288f1
protocol/between: the protocol expects to have ' '-separated tuples
2008-10-22 21:41:57 +02:00
Benoit Boissinot
83c55610b6
enhance the error output in case of failure during http push
2008-09-08 14:22:14 +02:00
Dirkjan Ochtman
41a3b82458
add an Accept header to the http client
2008-06-29 23:02:02 +02:00
Matt Mackall
2f4925d536
remoterepo: no longer needed
...
All users already use repo.local() to test for local, which is false
in the repository base class. statichttprepository never derived from
this class anyway.
2008-03-20 11:12:35 -05:00
Bryan O'Sullivan
fb05f84647
Backed out changeset 8e55f27bfd09
2008-03-17 14:51:36 -07:00
Eric Hopper
fd0d9f6f68
Change User-agent field in client to have a lot more info.
2008-03-15 12:42:41 -07:00
Joel Rosdahl
4f8012378a
Remove unused imports
2008-03-06 22:23:41 +01:00
Joel Rosdahl
5dae3059a0
Expand import * to allow Pyflakes to find problems
2008-03-06 22:23:26 +01:00
Alexis S. L. Carvalho
961a45df72
merge with crew-stable
2008-02-03 21:47:07 -02:00
Alexis S. L. Carvalho
f636dc58cf
httprepo: use separate handlers for HTTP and HTTPS
...
This is needed to keep the code in keepalive.py from sharing
the same connection between HTTP and HTTPS.
cd1a6ad30c82 explains why we were using a single handler.
This should fix issue892.
2008-02-03 21:03:46 -02:00
Alexis S. L. Carvalho
67c49a0cf5
move __del__ from httprepository to basehttphandler
...
This should prevent the next patch from reopening an issue fixed by
b7ccb4b856de.
2008-02-03 21:03:46 -02:00
Dirkjan Ochtman
4ea6b6bcae
send conservatively capitalized HTTP headers
2008-01-23 14:28:25 +01:00
Christian Ebert
5c18a69d2e
Prefer i in d over d.has_key(i)
2008-01-20 14:39:25 +01:00
Alexis S. L. Carvalho
f8788ac266
httprepo: give self._url and the netloc to the password manager
...
This should hide some differences between different python versions.
2007-11-09 20:21:35 -02:00
Elliott Peele
dae15f3456
https url handling: usernames and passwords were registered to the wrong url
2007-10-30 16:54:25 -07:00
Sebastian Hauer
14709cb72b
httprepo: ignore environment proxies when proxies are disabled
2007-10-24 22:15:45 +02:00
Alexis S. L. Carvalho
ddf41e005d
Merge with crew-stable
2007-09-24 19:14:18 -03:00
Alexis S. L. Carvalho
4b5f93a4e8
Push over HTTP: really tell the user the size of the bundle
2007-09-24 19:00:11 -03:00
Bryan O'Sullivan
6fbb9f2f2f
Push capability checking into protocol-level code.
2007-08-27 14:48:08 -07:00
Bryan O'Sullivan
eba82ab39c
Turn capabilities into a mutable set, instead of a fixed tuple.
2007-08-27 14:16:04 -07:00
Alexis S. L. Carvalho
1ee06d75a7
Merge with crew-stable
2007-08-17 23:20:13 -03:00
Peter Meerwald
263e23ecf3
recognize user:password in URLs that include port numbers.
...
when giving user/pwd in an URL, eg.
hg pull http://user:pwd@host.com:666/hg/something ,
hg would still ask for user/pwd in interactive mode (or fail in
non-interactive)
2007-08-17 22:43:38 -03:00