Skip to content

Commit

Permalink
Fix style nit in Python slicing.
Browse files Browse the repository at this point in the history
Python slices start at 0 by default.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Simon Hausmann <simon@lst.de>
  • Loading branch information
Han-Wen Nienhuys authored and Simon Hausmann committed Aug 2, 2007
1 parent a4eba02 commit 7fcff9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 7fcff9d

Please sign in to comment.