Re: [PATCH 4/9] contrib: remove git-p4import

2013-11-26 Thread Pete Wyckoff
jrnie...@gmail.com wrote on Mon, 25 Nov 2013 12:58 -0800:
 The git p4import documentation has suggested git p4 as a better
 alternative for more than 6 years.  (According to the mailing list
 discussion when it was moved to contrib/, git-p4import has serious
 bugs --- e.g., its incremental mode just doesn't work.) Since then,
 git p4 has been actively developed and was promoted to a standard git
 command alongside git svn.
 
 Searches on google.com/trends and stackoverflow suggest that no one is
 looking for git-p4import any more.  Remove it.
 
 Noticed while considering marking the contrib/p4import/git-p4import.py
 script executable as part of a wider sweep.

I haven't seen git-p4import mentioned for the last 6 years either.
Thanks,

Acked-by: Pete Wyckoff p...@padd.com 

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


[PATCH 4/9] contrib: remove git-p4import

2013-11-25 Thread Jonathan Nieder
The git p4import documentation has suggested git p4 as a better
alternative for more than 6 years.  (According to the mailing list
discussion when it was moved to contrib/, git-p4import has serious
bugs --- e.g., its incremental mode just doesn't work.) Since then,
git p4 has been actively developed and was promoted to a standard git
command alongside git svn.

Searches on google.com/trends and stackoverflow suggest that no one is
looking for git-p4import any more.  Remove it.

Noticed while considering marking the contrib/p4import/git-p4import.py
script executable as part of a wider sweep.

Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
Following up on
http://thread.gmane.org/gmane.comp.version-control.git/52580

 contrib/p4import/README   |   1 -
 contrib/p4import/git-p4import.py  | 365 --
 contrib/p4import/git-p4import.txt | 167 -
 3 files changed, 533 deletions(-)
 delete mode 100644 contrib/p4import/README
 delete mode 100644 contrib/p4import/git-p4import.py
 delete mode 100644 contrib/p4import/git-p4import.txt

diff --git a/contrib/p4import/README b/contrib/p4import/README
deleted file mode 100644
index b9892b6..000
--- a/contrib/p4import/README
+++ /dev/null
@@ -1 +0,0 @@
-Please see contrib/fast-import/git-p4 for a better Perforce importer.
diff --git a/contrib/p4import/git-p4import.py b/contrib/p4import/git-p4import.py
deleted file mode 100644
index 593d6a0..000
--- a/contrib/p4import/git-p4import.py
+++ /dev/null
@@ -1,365 +0,0 @@
-#!/usr/bin/env python
-#
-# This tool is copyright (c) 2006, Sean Estabrooks.
-# It is released under the Gnu Public License, version 2.
-#
-# Import Perforce branches into Git repositories.
-# Checking out the files is done by calling the standard p4
-# client which you must have properly configured yourself
-#
-
-import marshal
-import os
-import sys
-import time
-import getopt
-
-if sys.hexversion  0x0202:
-   # The behavior of the marshal module changed significantly in 2.2
-   sys.stderr.write(git-p4import.py: requires Python 2.2 or later.\n)
-   sys.exit(1)
-
-from signal import signal, \
-   SIGPIPE, SIGINT, SIG_DFL, \
-   default_int_handler
-
-signal(SIGPIPE, SIG_DFL)
-s = signal(SIGINT, SIG_DFL)
-if s != default_int_handler:
-   signal(SIGINT, s)
-
-def die(msg, *args):
-for a in args:
-msg = %s %s % (msg, a)
-print git-p4import fatal error:, msg
-sys.exit(1)
-
-def usage():
-print USAGE: git-p4import [-q|-v]  [--authors=file]  [-t timezone]  
[//p4repo/path branch]
-sys.exit(1)
-
-verbosity = 1
-logfile = /dev/null
-ignore_warnings = False
-stitch = 0
-tagall = True
-
-def report(level, msg, *args):
-global verbosity
-global logfile
-for a in args:
-msg = %s %s % (msg, a)
-fd = open(logfile, a)
-fd.writelines(msg)
-fd.close()
-if level = verbosity:
-print msg
-
-class p4_command:
-def __init__(self, _repopath):
-try:
-global logfile
-self.userlist = {}
-if _repopath[-1] == '/':
-self.repopath = _repopath[:-1]
-else:
-self.repopath = _repopath
-if self.repopath[-4:] != /...:
-self.repopath= %s/... % self.repopath
-f=os.popen('p4 -V 2%s'%logfile, 'rb')
-a = f.readlines()
-if f.close():
-raise
-except:
-die(Could not find the \p4\ command)
-
-def p4(self, cmd, *args):
-global logfile
-cmd = %s %s % (cmd, ' '.join(args))
-report(2, P4:, cmd)
-f=os.popen('p4 -G %s 2%s' % (cmd,logfile), 'rb')
-list = []
-while 1:
-   try:
-list.append(marshal.load(f))
-   except EOFError:
-break
-self.ret = f.close()
-return list
-
-def sync(self, id, force=False, trick=False, test=False):
-if force:
-ret = self.p4(sync -f %s@%s%(self.repopath, id))[0]
-elif trick:
-ret = self.p4(sync -k %s@%s%(self.repopath, id))[0]
-elif test:
-ret = self.p4(sync -n %s@%s%(self.repopath, id))[0]
-else:
-ret = self.p4(sync%s@%s%(self.repopath, id))[0]
-if ret['code'] == error:
- data = ret['data'].upper()
- if data.find('VIEW')  0:
- die(Perforce reports %s is not in client view% 
self.repopath)
- elif data.find('UP-TO-DATE')  0:
- die(Could not sync files from perforce, self.repopath)
-
-def changes(self, since=0):
-try:
-list = []
-for rec in self.p4(changes %s@%s,#head % (self.repopath, 
since+1)):
-list.append(rec['change'])
-list.reverse()
-return list
-except:
-return []
-
-def authors(self, filename):
-f=open(filename)
-for l in f.readlines():
-