Commit Graph

61 Commits

Author SHA1 Message Date
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
Benoit Boissinot
e1a55dc93c zeroconf: use port from server instead of picking port from config (issue3746)
In order to get the port, wrap create server instead of
hgweb_mod/hgwebdir_mod.
2012-12-30 19:19:52 +01:00
Mads Kiilerich
5e3dc3e383 avoid using abbreviations that look like spelling errors 2012-08-27 23:14:27 +02:00
Mads Kiilerich
520076e707 delete some dead comments and docstrings 2012-08-21 02:41:20 +02:00
Mads Kiilerich
2372d51b68 fix wording and not-completely-trivial spelling errors and bad docstrings 2012-08-15 22:39:18 +02:00
Mads Kiilerich
2f4504e446 fix trivial spelling errors 2012-08-15 22:38:42 +02:00
Augie Fackler
96d44b39f7 hgext: mark all first-party extensions as such 2012-05-15 14:37:49 -05:00
Brodie Rao
c577fac135 cleanup: replace naked excepts with more specific ones 2012-05-12 16:02:45 +02:00
Brodie Rao
d6a6abf2b0 cleanup: eradicate long lines 2012-05-12 15:54:54 +02:00
Martin Geisler
d8334151e6 Remove FSF mailing address from GPL headers
The GPLv3 FAQ suggests to upgrade by

  [...] replace all your existing v2 license notices (usually at the
  top of each file) with the new recommended text available on the GNU
  licenses howto. It's more future-proof because it no longer includes
  the FSF's postal mailing address.

This removes the postal address, but leaves the version number at 2+.
2012-01-06 16:27:13 +01:00
Martin Geisler
af8a35e078 check-code: flag 0/1 used as constant Boolean expression 2011-06-01 12:38:46 +02:00
Matt Mackall
e941b69730 merge with stable 2011-05-01 06:06:59 -05:00
Nicolas Dumazet
892f3cacb5 zeroconf: notify the Zeroconf threads when hg exits
Zeroconf launches two threads in the background, and they wait on
Condition objects to exit. We need to call Zeroconf.close() to
release those conditions so that threads can gracefully exit.

This means that an interrupt on the hg process will now gracefully
propagate to the Zeroconf children, fixing that bug which did not
allow us to kill an `hg serve` process.
2011-04-30 19:36:59 +02:00
Augie Fackler
9398f9dfcc Zeroconf: catch both ValueError and KeyError in get()
This prevents a traceback during discovery of available hosts.
2011-04-30 07:30:38 -05:00
Matt Mackall
24e0621116 zeroconf: clean up naked exceptions 2011-04-13 12:57:24 -05:00
Brodie Rao
d1905b7d87 mail/hgweb: support service names for ports (issue2350)
This adds util.getport(port) which tries to parse port as an int, and
failing that, looks it up using socket.getservbyname(). Thus, the
following will work:

    [smtp]
    port = submission

    [web]
    port = http

This does not apply to ports in URLs used in clone, pull, etc.
2010-08-28 12:31:07 -04:00
Martin Geisler
7b12009341 zeroconf: small fixes in docstring
Use reST role for consistency, import small part of Debian's
proposed_upstream__correct-zeroconf-doc patch from

  http://svn.debian.org/viewsvn/python-apps/packages/mercurial/trunk/debian/patches/
2010-07-03 01:56:09 +02:00
Javi Merino
9da23a6f37 zeroconf: Use BadDomainName exception instead of string exceptions
String exceptions no longer work in python 2.6. Use exception classes
instead.
2010-06-23 10:45:53 +02:00
Renato Cunha
b35e385443 hgext/zeroconf/__init__.py: Separate relative and absolute imports.
2to3 complains when relative and absolute imports are mixed, this fix just
separates them on the zeroconf extension. According to 2to3, the other modules
are fine.
2010-06-14 16:56:20 -03:00
Matt Mackall
7032c8dbda zeroconf: handle string hgweb config args 2010-04-26 11:03:40 -05:00
Matt Mackall
3fea1c3bdd hgweb: make baseui parameter non-positional 2010-04-26 11:03:40 -05:00
Brendan Cully
9f7576938c zeroconf: suppress traceback during shutdown
If the read thred is in select when the main thread is in close, the main
thread may close the socket between select and read, generating a noisy
traceback. This can be ignored if the shutdown flag is set.
2010-02-19 16:50:47 -08:00
Brendan Cully
5551943cd9 zeroconf: use DNS length field to safely skip unknown record types 2010-02-08 00:01:08 +01:00
Brendan Cully
d5437ba5b0 zeroconf: better fix for readName error
Stop parsing when an unknown type is seen, since it is impossible
to resynchronize on the stream.
2010-02-07 19:39:29 +01:00
Brendan Cully
182305d033 zeroconf: try utf-16 decoding if utf-8 fails 2010-02-07 18:37:14 +01:00
Henrik Stuart
4a12117ba9 zeroconf: do not try to encode encoded strings (issue1942) 2010-02-06 17:31:54 +01:00
Henrik Stuart
ddf9d39f53 zeroconf: override default destination folder on clone 2010-02-06 17:31:49 +01:00
Dirkjan Ochtman
287aac4634 merge with stable 2010-02-05 17:24:38 +01:00
Augie Fackler
eb981049ec zeroconf: gethostbyaddr may also fail with socket.herror 2010-02-05 10:16:52 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Matt Mackall
3db5dbb558 zeroconf: flag third-party Zeroconf.py for ignore in check-code 2010-01-28 22:44:25 -06:00
Alexander Solovyov
cfac00d6dc zeroconf: read actual description for repos in hgwebdir 2009-09-26 00:17:55 +03:00
Alexander Solovyov
d31948f8ad zeroconf: code cleanup, fixing variable names to be meaningful 2009-09-26 00:17:02 +03:00
Patrick Mezard
01b7d3fa6f Merge with crew-stable 2009-09-13 17:53:09 +02:00
Patrick Mezard
54f5a65629 zeroconf: fix hgweb published URLs (issue1819) 2009-09-13 17:23:47 +02:00
Martin Geisler
a2b37975a1 zeroconf: wrap docstrings at 70 characters 2009-07-26 02:03:35 +02:00
Martin Geisler
5aa846e94b zeroconf: use reST syntax for literal blocks 2009-07-23 00:26:42 +02:00
Martin Geisler
69ea0fdaa1 zeroconf: wrapped docstrings at 78 characters 2009-07-07 23:54:42 +02:00
Cédric Duval
dbcec5595d extensions: improve the consistency of synopses
Trying as much as possible to consistently:
 - use a present tense predicate followed by a direct object
 - verb referring directly to the functionality provided
   (ie. not "add command that does this" but simple "do that")
 - keep simple and to the point, leaving details for the long help
   (width is tight, possibly even more so for translations)

Thanks to timeless, Martin Geisler, Rafael Villar Burke, Dan Villiom
Podlaski Christiansen and others for the helpful suggestions.
2009-06-22 15:48:08 +02:00
Cédric Duval
0caffe860f help: remove per-extension paragraph on how to enable it
The central place to find this information is the "extensions" help topic.
2009-06-20 20:57:13 +02:00
timeless
3ccbc308d0 Spell Mercurial as a proper noun 2009-06-09 09:25:31 -04:00
Martin Geisler
c1cdde97f7 zeroconf: remove unwarranted execute bit 2009-05-07 19:08:25 +02:00
Alexander Solovyov
c4db82ff74 zeroconf: guess ip for Zeroconf
Zeroconf() is actually pretty dumb in guessing IPs and in case of
socket.gaierror will not guess right IP.
2009-04-27 21:33:39 +03:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Matt Mackall
ba8099cfb8 hgweb: kill parentui references 2009-04-26 16:50:43 -05:00
Matt Mackall
be7d59ab85 ui: kill most users of parentui name and arg, replace with .copy() 2009-04-26 16:50:43 -05:00
Alexander Solovyov
e3fac599e8 zeroconf: don't fail on non-local names 2009-04-13 21:23:52 +03:00
Martin Geisler
1b1c4a29cf zeroconf: word-wrap help texts at 70 characters 2009-04-04 23:20:10 +02:00
Peter Arrenbrecht
8c3658a497 cleanup: whitespace cleanup 2009-03-23 13:13:27 +01:00
Peter Arrenbrecht
a2d3e23eef cleanup: drop variables for unused return values
They are unnecessary. I did leave them in localrepo.py where there is
something like:

  _junk = foo()
  _junk = None

to free memory early. I don't know if just `foo()` will free the return
value as early.
2009-03-23 13:13:02 +01:00