Show More
@@ -219,7 +219,7 b' def walkchangerevs(ui, repo, pats, opts)' | |||||
219 | rev = repo.changelog.rev(repo.lookup(rev)) |
|
219 | rev = repo.changelog.rev(repo.lookup(rev)) | |
220 | ff = followfilter() |
|
220 | ff = followfilter() | |
221 | stop = min(revs[0], revs[-1]) |
|
221 | stop = min(revs[0], revs[-1]) | |
222 | for x in range(rev, stop-1, -1): |
|
222 | for x in xrange(rev, stop-1, -1): | |
223 | if ff.match(x) and wanted.has_key(x): |
|
223 | if ff.match(x) and wanted.has_key(x): | |
224 | del wanted[x] |
|
224 | del wanted[x] | |
225 |
|
225 | |||
@@ -1245,7 +1245,7 b' def debugindex(ui, file_):' | |||||
1245 | r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_, "", 0) |
|
1245 | r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_, "", 0) | |
1246 | ui.write(" rev offset length base linkrev" + |
|
1246 | ui.write(" rev offset length base linkrev" + | |
1247 | " nodeid p1 p2\n") |
|
1247 | " nodeid p1 p2\n") | |
1248 | for i in range(r.count()): |
|
1248 | for i in xrange(r.count()): | |
1249 | node = r.node(i) |
|
1249 | node = r.node(i) | |
1250 | pp = r.parents(node) |
|
1250 | pp = r.parents(node) | |
1251 | ui.write("% 6d % 9d % 7d % 6d % 7d %s %s %s\n" % ( |
|
1251 | ui.write("% 6d % 9d % 7d % 6d % 7d %s %s %s\n" % ( | |
@@ -1256,7 +1256,7 b' def debugindexdot(ui, file_):' | |||||
1256 | """dump an index DAG as a .dot file""" |
|
1256 | """dump an index DAG as a .dot file""" | |
1257 | r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_, "", 0) |
|
1257 | r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_, "", 0) | |
1258 | ui.write("digraph G {\n") |
|
1258 | ui.write("digraph G {\n") | |
1259 | for i in range(r.count()): |
|
1259 | for i in xrange(r.count()): | |
1260 | node = r.node(i) |
|
1260 | node = r.node(i) | |
1261 | pp = r.parents(node) |
|
1261 | pp = r.parents(node) | |
1262 | ui.write("\t%d -> %d\n" % (r.rev(pp[0]), i)) |
|
1262 | ui.write("\t%d -> %d\n" % (r.rev(pp[0]), i)) | |
@@ -1443,15 +1443,15 b' def grep(ui, repo, pattern, *pats, **opt' | |||||
1443 | sm = difflib.SequenceMatcher(None, a, b) |
|
1443 | sm = difflib.SequenceMatcher(None, a, b) | |
1444 | for tag, alo, ahi, blo, bhi in sm.get_opcodes(): |
|
1444 | for tag, alo, ahi, blo, bhi in sm.get_opcodes(): | |
1445 | if tag == 'insert': |
|
1445 | if tag == 'insert': | |
1446 | for i in range(blo, bhi): |
|
1446 | for i in xrange(blo, bhi): | |
1447 | yield ('+', b[i]) |
|
1447 | yield ('+', b[i]) | |
1448 | elif tag == 'delete': |
|
1448 | elif tag == 'delete': | |
1449 | for i in range(alo, ahi): |
|
1449 | for i in xrange(alo, ahi): | |
1450 | yield ('-', a[i]) |
|
1450 | yield ('-', a[i]) | |
1451 | elif tag == 'replace': |
|
1451 | elif tag == 'replace': | |
1452 | for i in range(alo, ahi): |
|
1452 | for i in xrange(alo, ahi): | |
1453 | yield ('-', a[i]) |
|
1453 | yield ('-', a[i]) | |
1454 | for i in range(blo, bhi): |
|
1454 | for i in xrange(blo, bhi): | |
1455 | yield ('+', b[i]) |
|
1455 | yield ('+', b[i]) | |
1456 |
|
1456 | |||
1457 | prev = {} |
|
1457 | prev = {} |
General Comments 0
You need to be logged in to leave comments.
Login now