author | Paul Crowley <paul@lshift.net> |
Tue, 24 Feb 2009 09:49:56 +0000 | |
changeset 63 | b75177d307e5 |
parent 62 | f1e319d3672a |
permissions | -rw-r--r-- |
52
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
1 |
# Copyright 2008-2009 LShift Ltd |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
2 |
# Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
3 |
# |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
4 |
# Authors: |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
5 |
# Paul Crowley <paul@lshift.net> |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
6 |
# Vadim Gelfer <vadim.gelfer@gmail.com> |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
7 |
# |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
8 |
# This software may be used and distributed according to the terms |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
9 |
# of the GNU General Public License, incorporated herein by reference. |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
10 |
|
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
11 |
def changes(repo, node): |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
12 |
start = repo.changectx(node).rev() |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
13 |
try: |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
14 |
end = len(repo.changelog) |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
15 |
except: |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
16 |
end = repo.changelog.count() |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
17 |
for rev in xrange(start, end): |
f9eb98bb0791
Encapsulate change finding with backwards compatibility
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
18 |
yield repo.changectx(rev) |