Show More
@@ -133,8 +133,8 b' pypats = [' | |||||
133 | (r'\S;\s*\n', "semicolon"), |
|
133 | (r'\S;\s*\n', "semicolon"), | |
134 | (r'[^_]_\("[^"]+"\s*%', "don't use % inside _()"), |
|
134 | (r'[^_]_\("[^"]+"\s*%', "don't use % inside _()"), | |
135 | (r"[^_]_\('[^']+'\s*%", "don't use % inside _()"), |
|
135 | (r"[^_]_\('[^']+'\s*%", "don't use % inside _()"), | |
136 | (r'\w,\w', "missing whitespace after ,"), |
|
136 | (r'(\w|\)),\w', "missing whitespace after ,"), | |
137 | (r'\w[+/*\-<>]\w', "missing whitespace in expression"), |
|
137 | (r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"), | |
138 | (r'^\s+\w+=\w+[^,)\n]$', "missing whitespace in assignment"), |
|
138 | (r'^\s+\w+=\w+[^,)\n]$', "missing whitespace in assignment"), | |
139 | (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n' |
|
139 | (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n' | |
140 | r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Python 2.4'), |
|
140 | r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Python 2.4'), |
@@ -146,7 +146,7 b' class Table(object):' | |||||
146 | text.extend(cell) |
|
146 | text.extend(cell) | |
147 | if not text[-1].endswith('\n'): |
|
147 | if not text[-1].endswith('\n'): | |
148 | text[-1] += '\n' |
|
148 | text[-1] += '\n' | |
149 | if i < len(row)-1: |
|
149 | if i < len(row) - 1: | |
150 | text.append('T}'+self._tab_char+'T{\n') |
|
150 | text.append('T}'+self._tab_char+'T{\n') | |
151 | else: |
|
151 | else: | |
152 | text.append('T}\n') |
|
152 | text.append('T}\n') | |
@@ -258,7 +258,7 b' class Translator(nodes.NodeVisitor):' | |||||
258 | # ensure we get a ".TH" as viewers require it. |
|
258 | # ensure we get a ".TH" as viewers require it. | |
259 | self.head.append(self.header()) |
|
259 | self.head.append(self.header()) | |
260 | # filter body |
|
260 | # filter body | |
261 | for i in xrange(len(self.body)-1, 0, -1): |
|
261 | for i in xrange(len(self.body) - 1, 0, -1): | |
262 | # remove superfluous vertical gaps. |
|
262 | # remove superfluous vertical gaps. | |
263 | if self.body[i] == '.sp\n': |
|
263 | if self.body[i] == '.sp\n': | |
264 | if self.body[i - 1][:4] in ('.BI ','.IP '): |
|
264 | if self.body[i - 1][:4] in ('.BI ','.IP '): | |
@@ -880,7 +880,7 b' class Translator(nodes.NodeVisitor):' | |||||
880 | self.context[-3] = '.BI' # bold/italic alternate |
|
880 | self.context[-3] = '.BI' # bold/italic alternate | |
881 | if node['delimiter'] != ' ': |
|
881 | if node['delimiter'] != ' ': | |
882 | self.body.append('\\fB%s ' % node['delimiter']) |
|
882 | self.body.append('\\fB%s ' % node['delimiter']) | |
883 | elif self.body[len(self.body)-1].endswith('='): |
|
883 | elif self.body[len(self.body) - 1].endswith('='): | |
884 | # a blank only means no blank in output, just changing font |
|
884 | # a blank only means no blank in output, just changing font | |
885 | self.body.append(' ') |
|
885 | self.body.append(' ') | |
886 | else: |
|
886 | else: |
@@ -50,7 +50,7 b' def pygmentize(field, fctx, style, tmpl)' | |||||
50 | colorized = highlight(text, lexer, formatter) |
|
50 | colorized = highlight(text, lexer, formatter) | |
51 | # strip wrapping div |
|
51 | # strip wrapping div | |
52 | colorized = colorized[:colorized.find('\n</pre>')] |
|
52 | colorized = colorized[:colorized.find('\n</pre>')] | |
53 | colorized = colorized[colorized.find('<pre>')+5:] |
|
53 | colorized = colorized[colorized.find('<pre>') + 5:] | |
54 | coloriter = (s.encode(encoding.encoding, 'replace') |
|
54 | coloriter = (s.encode(encoding.encoding, 'replace') | |
55 | for s in colorized.splitlines()) |
|
55 | for s in colorized.splitlines()) | |
56 |
|
56 |
@@ -72,7 +72,7 b' class event(object):' | |||||
72 |
|
72 | |||
73 | def __repr__(self): |
|
73 | def __repr__(self): | |
74 | r = repr(self.raw) |
|
74 | r = repr(self.raw) | |
75 | return 'event(path=' + repr(self.path) + ', ' + r[r.find('(')+1:] |
|
75 | return 'event(path=' + repr(self.path) + ', ' + r[r.find('(') + 1:] | |
76 |
|
76 | |||
77 |
|
77 | |||
78 | _event_props = { |
|
78 | _event_props = { |
@@ -1147,7 +1147,7 b' class queue(object):' | |||||
1147 | return matches[0] |
|
1147 | return matches[0] | |
1148 | if self.series and self.applied: |
|
1148 | if self.series and self.applied: | |
1149 | if s == 'qtip': |
|
1149 | if s == 'qtip': | |
1150 | return self.series[self.seriesend(True)-1] |
|
1150 | return self.series[self.seriesend(True) - 1] | |
1151 | if s == 'qbase': |
|
1151 | if s == 'qbase': | |
1152 | return self.series[0] |
|
1152 | return self.series[0] | |
1153 | return None |
|
1153 | return None | |
@@ -1626,7 +1626,7 b' class queue(object):' | |||||
1626 | # if the patch excludes a modified file, mark that |
|
1626 | # if the patch excludes a modified file, mark that | |
1627 | # file with mtime=0 so status can see it. |
|
1627 | # file with mtime=0 so status can see it. | |
1628 | mm = [] |
|
1628 | mm = [] | |
1629 | for i in xrange(len(m)-1, -1, -1): |
|
1629 | for i in xrange(len(m) - 1, -1, -1): | |
1630 | if not matchfn(m[i]): |
|
1630 | if not matchfn(m[i]): | |
1631 | mm.append(m[i]) |
|
1631 | mm.append(m[i]) | |
1632 | del m[i] |
|
1632 | del m[i] |
@@ -121,7 +121,7 b' def forbidnewline(ui, repo, hooktype, no' | |||||
121 | # changegroup that contains an unacceptable commit followed later |
|
121 | # changegroup that contains an unacceptable commit followed later | |
122 | # by a commit that fixes the problem. |
|
122 | # by a commit that fixes the problem. | |
123 | tip = repo['tip'] |
|
123 | tip = repo['tip'] | |
124 | for rev in xrange(len(repo)-1, repo[node].rev()-1, -1): |
|
124 | for rev in xrange(len(repo) - 1, repo[node].rev() - 1, -1): | |
125 | c = repo[rev] |
|
125 | c = repo[rev] | |
126 | for f in c.files(): |
|
126 | for f in c.files(): | |
127 | if f in seen or f not in tip or f not in c: |
|
127 | if f in seen or f not in tip or f not in c: |
@@ -46,7 +46,7 b' def ignorepats(lines):' | |||||
46 | pat = line |
|
46 | pat = line | |
47 | break |
|
47 | break | |
48 | elif line.startswith(s+':'): |
|
48 | elif line.startswith(s+':'): | |
49 | pat = rels + line[len(s)+1:] |
|
49 | pat = rels + line[len(s) + 1:] | |
50 | break |
|
50 | break | |
51 | patterns.append(pat) |
|
51 | patterns.append(pat) | |
52 |
|
52 |
@@ -2655,7 +2655,7 b' class localrepository(object):' | |||||
2655 | fp.write(text) |
|
2655 | fp.write(text) | |
2656 | finally: |
|
2656 | finally: | |
2657 | fp.close() |
|
2657 | fp.close() | |
2658 | return self.pathto(fp.name[len(self.root)+1:]) |
|
2658 | return self.pathto(fp.name[len(self.root) + 1:]) | |
2659 |
|
2659 | |||
2660 | # used to avoid circular references so destructors work |
|
2660 | # used to avoid circular references so destructors work | |
2661 | def aftertrans(files): |
|
2661 | def aftertrans(files): |
@@ -1007,7 +1007,7 b' class hunk(object):' | |||||
1007 |
|
1007 | |||
1008 | bot = min(fuzz, bot) |
|
1008 | bot = min(fuzz, bot) | |
1009 | top = min(fuzz, top) |
|
1009 | top = min(fuzz, top) | |
1010 | return old[top:len(old)-bot], new[top:len(new)-bot], top |
|
1010 | return old[top:len(old) - bot], new[top:len(new) - bot], top | |
1011 | return old, new, 0 |
|
1011 | return old, new, 0 | |
1012 |
|
1012 | |||
1013 | def fuzzit(self, fuzz, toponly): |
|
1013 | def fuzzit(self, fuzz, toponly): |
@@ -76,7 +76,7 b' def _buildencodefun():' | |||||
76 | cmap = dict([(chr(x), chr(x)) for x in xrange(127)]) |
|
76 | cmap = dict([(chr(x), chr(x)) for x in xrange(127)]) | |
77 | for x in (range(32) + range(126, 256) + winreserved): |
|
77 | for x in (range(32) + range(126, 256) + winreserved): | |
78 | cmap[chr(x)] = "~%02x" % x |
|
78 | cmap[chr(x)] = "~%02x" % x | |
79 | for x in range(ord("A"), ord("Z")+1) + [ord(e)]: |
|
79 | for x in range(ord("A"), ord("Z") + 1) + [ord(e)]: | |
80 | cmap[chr(x)] = e + chr(x).lower() |
|
80 | cmap[chr(x)] = e + chr(x).lower() | |
81 | dmap = {} |
|
81 | dmap = {} | |
82 | for k, v in cmap.iteritems(): |
|
82 | for k, v in cmap.iteritems(): | |
@@ -128,7 +128,7 b' def _buildlowerencodefun():' | |||||
128 | cmap = dict([(chr(x), chr(x)) for x in xrange(127)]) |
|
128 | cmap = dict([(chr(x), chr(x)) for x in xrange(127)]) | |
129 | for x in (range(32) + range(126, 256) + winreserved): |
|
129 | for x in (range(32) + range(126, 256) + winreserved): | |
130 | cmap[chr(x)] = "~%02x" % x |
|
130 | cmap[chr(x)] = "~%02x" % x | |
131 | for x in range(ord("A"), ord("Z")+1): |
|
131 | for x in range(ord("A"), ord("Z") + 1): | |
132 | cmap[chr(x)] = chr(x).lower() |
|
132 | cmap[chr(x)] = chr(x).lower() | |
133 | return lambda s: "".join([cmap[c] for c in s]) |
|
133 | return lambda s: "".join([cmap[c] for c in s]) | |
134 |
|
134 |
@@ -613,7 +613,7 b' class ui(object):' | |||||
613 | ('&None', 'E&xec', 'Sym&link') Responses are case insensitive. |
|
613 | ('&None', 'E&xec', 'Sym&link') Responses are case insensitive. | |
614 | If ui is not interactive, the default is returned. |
|
614 | If ui is not interactive, the default is returned. | |
615 | """ |
|
615 | """ | |
616 | resps = [s[s.index('&')+1].lower() for s in choices] |
|
616 | resps = [s[s.index('&') + 1].lower() for s in choices] | |
617 | while True: |
|
617 | while True: | |
618 | r = self.prompt(msg, resps[default]) |
|
618 | r = self.prompt(msg, resps[default]) | |
619 | if r.lower() in resps: |
|
619 | if r.lower() in resps: |
General Comments 0
You need to be logged in to leave comments.
Login now