git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jon Smirl" <jonsmirl@gmail.com>
To: "Keith Packard" <keithp@keithp.com>
Cc: git@vger.kernel.org
Subject: Re: Importing Mozilla CVS into git
Date: Thu, 1 Jun 2006 20:55:49 -0400	[thread overview]
Message-ID: <9e4733910606011755n29a149f2m1409c5a23888f1c5@mail.gmail.com> (raw)
In-Reply-To: <1149204044.27695.38.camel@neko.keithp.com>

[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]

With the attached patch you can parse the entire Mozilla tree. The
tree has over 100,000 files in it and about 300 branches.

I ran this overnight and it failed with out of memory on a 1GB machine
with 1GB swap. If failed in the branch processing, the parse phase
succeeded.

How much memory does something like this need?

If you want to quickly check out the branch processing problems use
rsync to pull down just a copy of repository files.

I am getting 1000s of warnings like these and I haven't figured out why yet.

Warning: ../mozilla/mozilla/build/mac/build_scripts/Attic/MozillaCheckoutList.txt,v:
unnamed branch from master
Warning: ../mozilla/mozilla/build/unix/run-mozilla.sh,v: unnamed
branch from master
Warning: ../mozilla/mozilla/Makefile.in,v: unnamed branch from master of 99855
Warning: ../mozilla/mozilla/Makefile.in,v: unnamed branch from master
Warning: ../mozilla/mozilla/allmakefiles.sh,v: unnamed branch from master99855
Warning: ../mozilla/mozilla/allmakefiles.sh,v: unnamed branch from master
Warning: ../mozilla/mozilla/cmd/macfe/MailNews/AddressBook/Attic/UAddressBookUtilities.cp,v:
unnamed branch from master
Warning: ../mozilla/mozilla/cmd/macfe/MailNews/AddressBook/Attic/UAddressBookUtilities.h,v:
unnamed branch from master
Warning: ../mozilla/mozilla/cmd/macfe/central/Attic/msv2dsk.cp,v:
unnamed branch from master

-- 
Jon Smirl
jonsmirl@gmail.com

[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 1618 bytes --]

diff --git a/gram.y b/gram.y
index 502991e..4566628 100644
--- a/gram.y
+++ b/gram.y
@@ -18,6 +18,7 @@
  */
 
 #include "cvs.h"
+#define YYDEBUG 1
     
 void yyerror (char *msg);
 
@@ -72,6 +73,7 @@ header		: HEAD NUMBER SEMI
 		| symbollist
 		  { this_file->symbols = $1; }
 		| LOCKS SEMI lock_type SEMI
+		| LOCKS NAME COLON NUMBER SEMI lock_type SEMI
 		| COMMENT DATA SEMI
 		| EXPAND DATA SEMI
 		;
@@ -91,6 +93,21 @@ symbol		: NAME COLON NUMBER
 			$$->name = $1;
 			$$->number = $3;
 		  }
+		| NUMBER COLON NUMBER
+		  {
+		  	char buffer[200];
+		  	int i, j;
+		  	
+		  	j = 0;
+		  	for (i = 0; i < $1.c; i++) {
+		  		if (i != 0)
+			  		j += sprintf(&buffer[j], ".");
+		  		j += sprintf(&buffer[j], "%d", $1.n[i]);
+		  	}
+			$$ = calloc (1, sizeof (cvs_symbol));
+			$$->name = atom(buffer);
+			$$->number = $3;
+		  }
 		;
 revisions	: revision revisions
 		  { $1->next = $2; $$ = $1; }
diff --git a/lex.l b/lex.l
index f25b8a5..956eed7 100644
--- a/lex.l
+++ b/lex.l
@@ -52,7 +52,7 @@ #define YY_INPUT(buf,result,max_size) { 
 					BEGIN(INITIAL);
 					return TEXT_DATA;
 				}
-<CONTENT>[-a-zA-Z_0-9+][-a-zA-Z_0-9+/]* {
+<CONTENT>[-a-zA-Z_+][-a-zA-Z_0-9+/.%]* {
 					yylval.s = atom (yytext);
 					return NAME;
 				}
diff --git a/parsecvs.c b/parsecvs.c
index df083c6..e9b8056 100644
--- a/parsecvs.c
+++ b/parsecvs.c
@@ -27,7 +27,9 @@ #endif
 
 cvs_file	*this_file;
 
-rev_execution_mode rev_mode = ExecuteGit;
+//rev_execution_mode rev_mode = ExecuteGit;
+//rev_execution_mode rev_mode = ExecuteGraph;
+rev_execution_mode rev_mode = ExecuteSplits;
 
 int elide = 0;
 int difffiles = 1;

  reply	other threads:[~2006-06-02  0:55 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-01 22:21 Importing Mozilla CVS into git Jon Smirl
2006-06-01 23:20 ` Keith Packard
2006-06-02  0:55   ` Jon Smirl [this message]
2006-06-02  2:07     ` Keith Packard
2006-06-02  2:36       ` Jon Smirl
2006-06-02  2:56         ` Shawn Pearce
2006-06-02  3:39         ` Keith Packard
2006-06-02  3:47           ` Jon Smirl
2006-06-02  3:55             ` Keith Packard
2006-06-02  4:00               ` Jon Smirl
2006-06-02  4:11                 ` Shawn Pearce
2006-06-02  4:39                   ` Pavel Roskin
2006-06-02  4:44                     ` Shawn Pearce
2006-06-02  7:46                       ` Johannes Schindelin
2006-06-02  4:44                     ` Jon Smirl
2006-06-07  9:02                       ` Igor Bukanov
2006-06-07 15:21                         ` Pavel Roskin
2006-06-07 15:30                         ` Jon Smirl
2006-06-07 15:58                           ` Jakub Narebski
2006-06-07 16:17                             ` Linus Torvalds
2006-06-07 18:29                               ` Martin Langhoff
2006-06-02  4:16                 ` Martin Langhoff
2006-06-03 23:16                   ` Robin Rosenberg (list subscriber)
2006-06-03 23:47                     ` Linus Torvalds
2006-06-04  2:24                       ` Bertrand Jacquin
2006-06-04  7:05                       ` Jakub Narebski
2006-06-04 17:55                         ` Linus Torvalds
2006-06-04 19:44                           ` Robin Rosenberg (list subscriber)
2006-06-04 20:00                             ` Linus Torvalds
2006-06-04 21:25                               ` Robin Rosenberg (list subscriber)
2006-06-04 22:02                                 ` Robin Rosenberg (list subscriber)
2006-06-04 23:19                                 ` Linus Torvalds
2006-06-05  0:10                       ` Yakov Lerner
2006-06-03  0:09               ` Jon Smirl
2006-06-03  4:28     ` Jon Smirl
2006-06-06  5:55       ` Martin Langhoff
2006-06-06 15:13         ` Jon Smirl
2006-06-06 19:57           ` Martin Langhoff
2006-06-07  0:12             ` Keith Packard
2006-06-07  0:40           ` Jon Smirl
2006-06-01 23:48 ` Linus Torvalds
2006-06-02  0:59   ` Jon Smirl
2006-06-02  1:11     ` Linus Torvalds
2006-06-02  6:40       ` Junio C Hamano
2006-06-02 15:53         ` Linus Torvalds
2006-06-02 16:00           ` Junio C Hamano
2006-06-02  4:14 ` Martin Langhoff

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=9e4733910606011755n29a149f2m1409c5a23888f1c5@mail.gmail.com \
    --to=jonsmirl@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=keithp@keithp.com \
    /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).