summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Han-Wen Nienhuys <hanwen@google.com>2007-07-23 15:56:37 -0700
committerLibravatar Simon Hausmann <simon@lst.de>2007-08-02 09:40:28 +0200
commit7fcff9def564fae7de5d2a34a095229a999b80b0 (patch)
tree67872507f646ba31587a7b2e13bb4d9afa91dd21 /contrib
parentSort output of "p4 change" in incremental import before further (diff)
downloadtgif-7fcff9def564fae7de5d2a34a095229a999b80b0.tar.xz
Fix style nit in Python slicing.
Python slices start at 0 by default. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/fast-import/git-p46
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index f00c691a7b..41e86e76cb 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1181,11 +1181,11 @@ class P4Sync(Command):
elif ',' not in self.changeRange:
self.revision = self.changeRange
self.changeRange = ""
- p = p[0:atIdx]
+ p = p[:atIdx]
elif p.find("#") != -1:
hashIdx = p.index("#")
self.revision = p[hashIdx:]
- p = p[0:hashIdx]
+ p = p[:hashIdx]
elif self.previousDepotPaths == []:
self.revision = "#head"
@@ -1299,7 +1299,7 @@ class P4Sync(Command):
changes.sort()
if len(self.maxChanges) > 0:
- changes = changes[0:min(int(self.maxChanges), len(changes))]
+ changes = changes[:min(int(self.maxChanges), len(changes))]
if len(changes) == 0:
if not self.silent: