[PATCH] Fix git-p4 on Windows to not use the Posix sysconf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From 255ec32feb7525db8eef582eeed2b6e60be35ed8 Mon Sep 17 00:00:00 2001
From: Marius Storm-Olsen <marius@xxxxxxxxxxxxx>
Date: Fri, 13 Jul 2007 14:39:05 +0200
Subject: [PATCH] Fix git-p4 on Windows to not use the Posix sysconf function.

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@xxxxxxxxxxxxx>
---
 contrib/fast-import/git-p4 |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 54a05eb..746e0ca 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -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)):
--
1.5.2-GUB

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux