Rev 2: trim off end before start so that the indexes are correct. in http://bzr.arbash-meinel.com/plugins/kndx_to_dot
John Arbash Meinel
john at arbash-meinel.com
Tue Apr 10 22:30:50 BST 2007
At http://bzr.arbash-meinel.com/plugins/kndx_to_dot
------------------------------------------------------------
revno: 2
revision-id: john at arbash-meinel.com-20070410213046-fdhgsjivynwmvcbd
parent: john at arbash-meinel.com-20070410212858-a31k4bi6j37h3okb
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: kndx_to_dot
timestamp: Tue 2007-04-10 16:30:46 -0500
message:
trim off end before start so that the indexes are correct.
modified:
__init__.py __init__.py-20070410212739-0uwundx7uoho7f6n-1
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py 2007-04-10 21:28:58 +0000
+++ b/__init__.py 2007-04-10 21:30:46 +0000
@@ -63,16 +63,16 @@
versions = kndx.get_versions()
version_idxs = dict((v, o) for o, v in enumerate(versions))
+ if end is not None:
+ try:
+ versions = versions[:int(end)+1]
+ except ValueError:
+ versions = versions[:versions.index(end)+1]
if start is not None:
try:
versions = versions[int(start):]
except ValueError:
versions = versions[versions.index(start):]
- if end is not None:
- try:
- versions = versions[:int(end)+1]
- except ValueError:
- versions = versions[:versions.index(end)+1]
self.outf.write('digraph T {\n'
' node [shape=box]\n'
More information about the bazaar-commits
mailing list