git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/5] git-p4 stream: remove unused function

From
PWPete Wyckoff <pw@padd.com>
Date
Jul 25, 2009, 14:23 UTC
Message-ID
<20090725142357.GB3841@arf.padd.com>
In-Reply-To
<20090725142329.GA3841@arf.padd.com>
This functionality was replaced.
Signed-off-by: Pete Wyckoff <pw@padd.com>
---
 contrib/fast-import/git-p4 |   58 --------------------------------------------
 1 files changed, 0 insertions(+), 58 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index f415ad0..70fa403 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -950,64 +950,6 @@ class P4Sync(Command):
 
         return branches
 
-    ## Should move this out, doesn't use SELF.
-    def readP4Files(self, files):
-        filesForCommit = []
-        filesToRead = []
-
-        for f in files:
-            includeFile = True
-            for val in self.clientSpecDirs:
-                if f['path'].startswith(val[0]):
-                    if val[1] <= 0:
-                        includeFile = False
-                    break
-
-            if includeFile:
-                filesForCommit.append(f)
-                if f['action'] not in ('delete', 'purge'):
-                    filesToRead.append(f)
-
-        filedata = []
-        if len(filesToRead) > 0:
-            filedata = p4CmdList('-x - print',
-                                 stdin='\n'.join(['%s#%s' % (f['path'], f['rev'])
-                                                  for f in filesToRead]),
-                                 stdin_mode='w+')
-
-            if "p4ExitCode" in filedata[0]:
-                die("Problems executing p4. Error: [%d]."
-                    % (filedata[0]['p4ExitCode']));
-
-        j = 0;
-        contents = {}
-        while j < len(filedata):
-            stat = filedata[j]
-            j += 1
-            text = ''
-            while j < len(filedata) and filedata[j]['code'] in ('text', 'unicode', 'binary'):
-                text += filedata[j]['data']
-                del filedata[j]['data']
-                j += 1
-
-            if not stat.has_key('depotFile'):
-                sys.stderr.write("p4 print fails with: %s\n" % repr(stat))
-                continue
-
-            if stat['type'] in ('text+ko', 'unicode+ko', 'binary+ko'):
-                text = re.sub(r'(?i)\$(Id|Header):[^$]*\$',r'$\1$', text)
-            elif stat['type'] in ('text+k', 'ktext', 'kxtext', 'unicode+k', 'binary+k'):
-                text = re.sub(r'\$(Id|Header|Author|Date|DateTime|Change|File|Revision):[^$\n]*\$',r'$\1$', text)
-
-            contents[stat['depotFile']] = text
-
-        for f in filesForCommit:
-            path = f['path']
-            if contents.has_key(path):
-                f['data'] = contents[path]
-
-        return filesForCommit
-
     # output one file from the P4 stream
     # - helper for streamP4Files
 
-- 
1.6.2.5
Previous: Pete WyckoffNext: Pete Wyckoff
Message 3 of 7 in “git-p4: stream from perforce to speed up clones”
  1. git-p4: stream from perforce to speed up clonesLuke Diamand, Jul 11, 2009
  2. Pete WyckoffJul 25, 2009
  3. 1/5 git-p4 stream: remove unused functionPete Wyckoff, Jul 25, 2009
  4. 2/5 git-p4 stream: do not pass branchPrefixes so muchPete Wyckoff, Jul 25, 2009
  5. 3/5 git-p4 stream: show relative path in debug messagesPete Wyckoff, Jul 25, 2009
  6. 4/5 git-p4 stream: check apple file typePete Wyckoff, Jul 25, 2009
  7. 5/5 git-p4 stream: use existing p4CmdList with callbackPete Wyckoff, Jul 25, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.