Commit Graph

18 Commits

Author SHA1 Message Date
Pierre-Yves David
30913031d4 error: get Abort from 'error' instead of 'util'
The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be
confused about that and gives all the credit to 'util' instead of the
hardworking 'error'. In a spirit of equity, we break the cycle of injustice and
give back to 'error' the respect it deserves. And screw that 'util' poser.

For great justice.
2015-10-08 12:55:45 -07:00
Augie Fackler
f95a6caba1 extensions: document that testedwith = 'internal' is special
Extension authors (notably at companies using hg) have been
cargo-culting the `testedwith = 'internal'` bit from hg's own
extensions, which then defeats our "file bugs over here" logic in
dispatch. Let's be more aggressive about trying to give extension
authors a hint about what testedwith should say.
2015-04-28 16:44:37 -04:00
Mads Kiilerich
c7d556777b scheme: don't crash on invalid URLs 2013-04-11 14:41:22 +02:00
Mads Kiilerich
2372d51b68 fix wording and not-completely-trivial spelling errors and bad docstrings 2012-08-15 22:39:18 +02:00
Augie Fackler
96d44b39f7 hgext: mark all first-party extensions as such 2012-05-15 14:37:49 -05:00
Patrick Mezard
3a0effcd7b util: fix url.__str__() for windows file URLs
Before:

  >>> str(url('file:///c:/tmp/foo/bar'))
  'file:c%3C/tmp/foo/bar'

After:

  >>> str(url('file:///c:/tmp/foo/bar'))
  'file:///c%3C/tmp/foo/bar'

The previous behaviour had no effect on mercurial itself (clone command for
instance) because we fortunately called .localpath() on the parsed URL.
hgsubversion was not so lucky and cloning a local subversion repository on
Windows no longer worked on the default branch (it works on stable because
2b62605189dc defeats the hasdriveletter() test in url class).

I do not know if the %3C is correct or not but svn accepts file:// URLs
containing it. Mads fixed it in 2b62605189dc, so we can always backport should
the need arise.
2011-12-04 18:22:25 +01:00
Matt Mackall
f0bc90519a hg: move peerschemes back to schemes
This will avoid breaking things with extensions until peers are fully
separated from repos.
2011-06-13 16:25:18 -05:00
Matt Mackall
f241322d80 hg: rearrange peer scheme lookup
There is now only peer scheme lookup. Repository lookup goes through
peer scheme lookup. When peer and repo types are finally separated,
repo lookup will use peer.local() to get a repository object.

The underbar is dropped so that extensions can patch the table.
2011-06-13 14:53:23 -05:00
Matt Mackall
aa85ea1250 hg: split peer and repo lookup tables 2011-06-11 14:14:52 -05:00
Brodie Rao
b7f0d2a103 url: move URL parsing functions into util to improve startup time
The introduction of the new URL parsing code has created a startup
time regression. This is mainly due to the use of url.hasscheme() in
the ui class. It ends up importing many libraries that the url module
requires.

This fix helps marginally, but if we can get rid of the urllib import
in the URL parser all together, startup time will go back to normal.

perfstartup time before the URL refactoring (707e4b1e8064):

! wall 0.050692 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)

current startup time (9ad1dce9e7f4):

! wall 0.070685 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)

after this change:

! wall 0.064667 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)
2011-04-30 09:43:20 -07:00
Matt Mackall
d0ca936e58 url: nuke some newly-introduced underbars in identifiers 2011-03-31 10:43:53 -05:00
Brodie Rao
475e3772da schemes: prevent one letter schemes from being interpreted as drive letters
To allow one letter schemes, this makes the extension override
url.has_drive_letter() to return False for any schemes defined.

On Windows, the extension will raise util.Abort for any schemes that
conflict with existing drive letters.
2011-03-30 20:01:47 -07:00
Benjamin Pollack
bcc53961eb schemes: add Kiln On Demand to default schemes 2010-03-24 16:42:08 -04:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Alexander Solovyov
023880fae9 schemes: url parts are counted from 1 2009-12-14 21:21:34 +02:00
Martin Geisler
faafb1f7f3 schemes: fixed typos in module docstring 2009-11-30 23:12:51 +01:00
Alexander Solovyov
57c962c64c schemes extension 2009-11-24 17:48:23 +02:00