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