Show More
@@ -170,7 +170,7 b' class bzr_source(converter_source):' | |||
|
170 | 170 | return changes |
|
171 | 171 | |
|
172 | 172 | def _gettreechanges(self, current, origin): |
|
173 |
revid = current._revision_id |
|
|
173 | revid = current._revision_id | |
|
174 | 174 | changes = [] |
|
175 | 175 | renames = {} |
|
176 | 176 | for (fileid, paths, changed_content, versioned, parent, name, |
@@ -172,7 +172,7 b' class gnuarch_source(converter_source, c' | |||
|
172 | 172 | |
|
173 | 173 | for src in self.changes[rev].ren_dirs: |
|
174 | 174 | to = self.changes[rev].ren_dirs[src] |
|
175 |
chgs, cps = self._rendirchanges(src, to) |
|
|
175 | chgs, cps = self._rendirchanges(src, to) | |
|
176 | 176 | changes += [(f, rev) for f in chgs] |
|
177 | 177 | copies.update(cps) |
|
178 | 178 |
@@ -92,7 +92,7 b' def difftree(ui, repo, node1=None, node2' | |||
|
92 | 92 | break |
|
93 | 93 | |
|
94 | 94 | def catcommit(ui, repo, n, prefix, ctx=None): |
|
95 |
nlprefix = '\n' + prefix |
|
|
95 | nlprefix = '\n' + prefix | |
|
96 | 96 | if ctx is None: |
|
97 | 97 | ctx = repo[n] |
|
98 | 98 | ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ?? |
@@ -135,7 +135,7 b' def catfile(ui, repo, type=None, r=None,' | |||
|
135 | 135 | prefix = "" |
|
136 | 136 | if opts['stdin']: |
|
137 | 137 | try: |
|
138 |
(type, r) = raw_input().split(' ') |
|
|
138 | (type, r) = raw_input().split(' ') | |
|
139 | 139 | prefix = " " |
|
140 | 140 | except EOFError: |
|
141 | 141 | return |
@@ -148,12 +148,12 b' def catfile(ui, repo, type=None, r=None,' | |||
|
148 | 148 | while r: |
|
149 | 149 | if type != "commit": |
|
150 | 150 | ui.warn(_("aborting hg cat-file only understands commits\n")) |
|
151 |
return 1 |
|
|
151 | return 1 | |
|
152 | 152 | n = repo.lookup(r) |
|
153 | 153 | catcommit(ui, repo, n, prefix) |
|
154 | 154 | if opts['stdin']: |
|
155 | 155 | try: |
|
156 |
(type, r) = raw_input().split(' ') |
|
|
156 | (type, r) = raw_input().split(' ') | |
|
157 | 157 | except EOFError: |
|
158 | 158 | break |
|
159 | 159 | else: |
@@ -220,8 +220,8 b' def revtree(ui, args, repo, full="tree",' | |||
|
220 | 220 | |
|
221 | 221 | # calculate the graph for the supplied commits |
|
222 | 222 | for i, n in enumerate(want_sha1): |
|
223 |
reachable.append(set()) |
|
|
224 |
visit = [n] |
|
|
223 | reachable.append(set()) | |
|
224 | visit = [n] | |
|
225 | 225 | reachable[i].add(n) |
|
226 | 226 | while visit: |
|
227 | 227 | n = visit.pop(0) |
@@ -9,7 +9,7 b'' | |||
|
9 | 9 | # file to defer pygments loading and speedup extension setup. |
|
10 | 10 | |
|
11 | 11 | from mercurial import demandimport |
|
12 |
demandimport.ignore.extend(['pkgutil', 'pkg_resources', '__main__' |
|
|
12 | demandimport.ignore.extend(['pkgutil', 'pkg_resources', '__main__']) | |
|
13 | 13 | from mercurial import util, encoding |
|
14 | 14 | |
|
15 | 15 | from pygments import highlight |
@@ -103,7 +103,7 b' def annotate(ui, repo, *pats, **opts):' | |||
|
103 | 103 | opts['number'] = 1 |
|
104 | 104 | |
|
105 | 105 | linenumber = opts.get('line_number') is not None |
|
106 |
if |
|
|
106 | if linenumber and (not opts.get('changeset')) and (not opts.get('number')): | |
|
107 | 107 | raise util.Abort(_('at least one of -n/-c is required for -l')) |
|
108 | 108 | |
|
109 | 109 | funcmap = [func for op, func in opmap if opts.get(op)] |
@@ -366,7 +366,7 b' class dirstate(object):' | |||
|
366 | 366 | def clear(self): |
|
367 | 367 | self._map = {} |
|
368 | 368 | if "_dirs" in self.__dict__: |
|
369 |
delattr(self, "_dirs") |
|
|
369 | delattr(self, "_dirs") | |
|
370 | 370 | self._copymap = {} |
|
371 | 371 | self._pl = [nullid, nullid] |
|
372 | 372 | self._dirty = True |
@@ -707,7 +707,7 b' def graph(web, req, tmpl):' | |||
|
707 | 707 | |
|
708 | 708 | dag = graphmod.revisions(web.repo, rev, downrev) |
|
709 | 709 | tree = list(graphmod.colored(dag)) |
|
710 |
canvasheight = (len(tree) + 1) * bg_height - 27 |
|
|
710 | canvasheight = (len(tree) + 1) * bg_height - 27 | |
|
711 | 711 | data = [] |
|
712 | 712 | for (id, type, ctx, vtx, edges) in tree: |
|
713 | 713 | if type != graphmod.CHANGESET: |
@@ -41,7 +41,7 b' class winstdout(object):' | |||
|
41 | 41 | limit = 16000 |
|
42 | 42 | l = len(s) |
|
43 | 43 | start = 0 |
|
44 |
self.softspace = 0 |
|
|
44 | self.softspace = 0 | |
|
45 | 45 | while start < l: |
|
46 | 46 | end = start + limit |
|
47 | 47 | self.fp.write(s[start:end]) |
@@ -217,7 +217,6 b' def statfiles(files):' | |||
|
217 | 217 | '''Stat each file in files and yield stat or None if file does not exist. |
|
218 | 218 | Cluster and cache stat per directory to minimize number of OS stat calls.''' |
|
219 | 219 | ncase = os.path.normcase |
|
220 | sep = os.sep | |
|
221 | 220 | dircache = {} # dirname -> filename -> status | None if file does not exist |
|
222 | 221 | for nf in files: |
|
223 | 222 | nf = ncase(nf) |
General Comments 0
You need to be logged in to leave comments.
Login now