Skip to content

Commit

Permalink
Fix git-p4 on Windows to not use the Posix sysconf function.
Browse files Browse the repository at this point in the history
Add condition for Windows, since it doesn't support the os.sysconf module.
We hardcode the commandline limit to 2K, as that should work on most
Windows platforms.

Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Acked-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Marius Storm-Olsen authored and Shawn O. Pearce committed Jul 15, 2007
1 parent c7bd550 commit 48b4c3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,11 @@ class P4Sync(Command):
# POSIX says it's 4096 bytes, default for Linux seems to be 130 K.
# and all OS from the table below seems to be higher than POSIX.
# See http://www.in-ulm.de/~mascheck/various/argmax/
argmax = min(4000, os.sysconf('SC_ARG_MAX'))
if (self.isWindows):
argmax = 2000
else:
argmax = min(4000, os.sysconf('SC_ARG_MAX'))

chunk = ''
filedata = []
for i in xrange(len(files)):
Expand Down

0 comments on commit 48b4c3d

Please sign in to comment.