# HG changeset patch # User Vadim Gelfer # Date 1141278240 28800 # Node ID dca000ef7d52402cfec550fde5ac95430640cce5 # Parent adef8661c8f9587c41b16190db87ef2e78ef7dc1# Parent 0b3f4be5c5bf8258e4370c7755a2a1ab32ac07eb merge with crew. diff -r adef8661c8f9 -r dca000ef7d52 contrib/bash_completion --- a/contrib/bash_completion Wed Mar 01 21:27:23 2006 -0800 +++ b/contrib/bash_completion Wed Mar 01 21:44:00 2006 -0800 @@ -4,19 +4,22 @@ { "$hg" --debug help 2>/dev/null | \ awk -F', ' '/^list of commands:/ {commands=1} - commands && /^ [^ ]/ { - sub(/ /, "") - sub(/:.*/, "") - command = $1 + commands==1 && /^ [^ ]/ { + line = substr($0, 2) + colon = index(line, ":") + if (colon > 0) + line = substr(line, 1, colon-1) + n = split(line, aliases) + command = aliases[1] if (index(command, "debug") == 1) { - for (i=1; i<=NF; i++) - debug[j++] = $i + for (i=1; i<=n; i++) + debug[j++] = aliases[i] next } print command - for (i=2; i<=NF; i++) - if (index(command, $i) != 1) - print $i + for (i=2; i<=n; i++) + if (index(command, aliases[i]) != 1) + print aliases[i] } /^global options:/ {exit 0} END {for (i in debug) print debug[i]}' diff -r adef8661c8f9 -r dca000ef7d52 mercurial/statichttprepo.py --- a/mercurial/statichttprepo.py Wed Mar 01 21:27:23 2006 -0800 +++ b/mercurial/statichttprepo.py Wed Mar 01 21:44:00 2006 -0800 @@ -15,8 +15,10 @@ def read(self, size=None): try: return httprangereader.httprangereader.read(self, size) + except urllib2.HTTPError, inst: + raise IOError(None, inst) except urllib2.URLError, inst: - raise IOError(None, str(inst)) + raise IOError(None, inst.reason[1]) def opener(base): """return a function that opens files over http""" diff -r adef8661c8f9 -r dca000ef7d52 tests/test-static-http.out --- a/tests/test-static-http.out Wed Mar 01 21:27:23 2006 -0800 +++ b/tests/test-static-http.out Wed Mar 01 21:44:00 2006 -0800 @@ -1,4 +1,4 @@ -abort: +abort: Connection refused 255 ls: copy: No such file or directory changeset: 0:61c9426e69fe