git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marius Storm-Olsen <marius@trolltech.com>
To: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>
Cc: Simon Hausmann <simon@lst.de>
Subject: [PATCH] Fix git-p4 on Windows to not use the Posix sysconf
Date: Fri, 13 Jul 2007 14:56:00 +0200	[thread overview]
Message-ID: <46977660.7070207@trolltech.com> (raw)

 From 255ec32feb7525db8eef582eeed2b6e60be35ed8 Mon Sep 17 00:00:00 2001
From: Marius Storm-Olsen <marius@trolltech.com>
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@trolltech.com>
---
  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

             reply	other threads:[~2007-07-13 12:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-13 12:56 Marius Storm-Olsen [this message]
2007-07-13 13:03 ` [PATCH] Fix git-p4 on Windows to not use the Posix sysconf Alex Riesen
2007-07-13 13:33   ` Simon Hausmann
2007-07-15  2:49     ` Shawn O. Pearce
2007-07-15  6:12       ` Junio C Hamano
2007-07-16  5:35         ` Shawn O. Pearce
2007-07-16  7:00           ` Junio C Hamano
2007-07-16 18:30           ` Simon Hausmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46977660.7070207@trolltech.com \
    --to=marius@trolltech.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=simon@lst.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).