Re: gitweb feature request: tarball for each commit
On Thu, Sep 08, 2005 at 04:30:22PM +1200, Martin Langhoff wrote: Actually... should get it done. I'll see if I can sneak it in sometime soon... This has been done at least twice already. See e.g., http://www.liacs.nl/~sverdool/gitweb.cgi?p=gitweb.git;a=summary Check the archives for the other implementation. skimo - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] gitweb - XMMS2 project customisations
On Fri, Aug 26, 2005 at 07:16:05PM +0800, Sham Chukoury wrote: G'day. I figured you folks might be interested in a number of modifications the XMMS2 team have made to gitweb. All the changes can be seen at http://git.xmms.se 1) Navbar refactoring (gitweb-xmms2navbar.diff) 3) Snapshot integration (gitweb-xmms2snapshots.diff snapshot.cgi) I've sent similar patches to the git mailing list almost two months ago, but Kay didn't take them. Maybe you could compare with my version http://www.liacs.nl/~sverdool/gitweb.cgi?p=gitweb.git;a=summary (I'll be mostly offline for the next couple of days.) skimo - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] gitweb - Use description instead of content:encoded.
On Thu, Aug 18, 2005 at 11:30:41PM +0900, Yasushi SHOJI wrote: Use description instead of content:encoded. Hmm in snownews this gets displayed as Use instead of .. (http://www.liacs.nl/~sverdool/gitweb.cgi?p=gitweb.git;a=rss) Is that a problem with snownews or with gitweb ? skimo - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Add merge detection to git-cvsimport
On Tue, Aug 16, 2005 at 10:35:27PM +1200, Martin Langhoff wrote: + +sub get_headref($$) { If you want to check whether a ref is valid, then it is better to use git-rev-parse... +my $name= shift; +my $git_dir = shift; +my $sha; + +if (open(C,$git_dir/refs/heads/$name)) { + chomp($sha = C); + close(C); + length($sha) == 40 + or die Cannot get head id for $name ($sha): $!\n; ... but if you're just going to die, then why not simply let git-commit-tree do the test ? + if ($mparent eq 'HEAD') { $mparent = 'origin'}; Please don't hardcode 'origin' here. skimo - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Switching heads and head vs branch after CVS import
On Sun, Aug 14, 2005 at 07:49:26PM -0700, Linus Torvalds wrote: On Mon, 15 Aug 2005, Martin Langhoff wrote: Except for the keyword expansion. surely there's a way to tell cvsps to not do it. Why would we ever want it? Ahh. I don't think we should blame cvsps, I think cvsimport should use the -ko flag to disable keyword expansion or whatever the magic flag is. Sven, Matthias, opinions? I've never used CVS keyword expansion, and always felt it was pointless, but hey.. I don't have any strong opinion on that, but I do think that by default a cvsimport should give you the same file contents that a cvs import would. Martin's patch seems to be going in the right direction. skimo - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] git-cvsimport-script: parse multidigit revisions
git-cvsimport-script: parse multidigit revisions. Previously, git-cvsimport-script would fail on revisions with more than one digit. Signed-off-by: Sven Verdoolaege [EMAIL PROTECTED] --- commit 7b5f7bcc470528beb4a0b6ef1c93ce634aaa0158 tree db66d0759f97016bd123e2351aa0e77585e3177b parent e30e814dbfef7a6e89418863e5d7291a2d53b18f author Sven Verdoolaege [EMAIL PROTECTED] Tue, 12 Jul 2005 22:36:57 +0200 committer Sven Verdoolaege [EMAIL PROTECTED] Tue, 12 Jul 2005 22:36:57 +0200 git-cvsimport-script |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/git-cvsimport-script b/git-cvsimport-script --- a/git-cvsimport-script +++ b/git-cvsimport-script @@ -675,7 +675,7 @@ while(CVS) { $state = 9; } elsif($state == 8) { $logmsg .= $_\n; - } elsif($state == 9 and /^\s+(\S+):(INITIAL|\d(?:\.\d+)+)-(\d(?:\.\d+)+)\s*$/) { + } elsif($state == 9 and /^\s+(\S+):(INITIAL|\d+(?:\.\d+)+)-(\d+(?:\.\d+)+)\s*$/) { # VERSION:1.96-1.96.2.1 my $init = ($2 eq INITIAL); my $fn = $1; - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] rev-list: add --full-objects flag.
On Sat, Jul 09, 2005 at 03:09:02PM -0600, Eric W. Biederman wrote: The current intelligent fetch currently has a problem that it cannot be used to bootstrap a repository. If you don't have an ancestor of what you are fetching you can't fetch it. Not sure if this is what you want, but you could use the following gitweb patch (to be applied on top of my previous patches) to get a git tree snapshot for bootstrapping. http://www.liacs.nl/~sverdool/gitweb.cgi?p=gitweb.git;a=summary http://www.liacs.nl/~sverdool/gitweb.git/ skimo -- Support pack snapshots. --- commit f76a442a0e2166b3f17db0e496545a600a33f94c tree f8f089ab738864e69e0155b10262dbec832b4a11 parent 8392280de17a89a451c1f7db4e268f2047d4aa83 author Sven Verdoolaege [EMAIL PROTECTED] Sun, 10 Jul 2005 23:56:42 +0200 committer Sven Verdoolaege [EMAIL PROTECTED] Sun, 10 Jul 2005 23:56:42 +0200 gitweb.cgi | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gitweb.cgi b/gitweb.cgi --- a/gitweb.cgi +++ b/gitweb.cgi @@ -2058,8 +2058,9 @@ sub git_snapshot { th/th\n . /tr\n; my %types = ( - 'Bzipped tar archive' = 'tar.bz2', - 'Gzipped tar archive' = 'tar.gz', + 'Source tree (bzipped tar archive)' = 'tar.bz2', + 'Source tree (gzipped tar archive)' = 'tar.gz', + 'Git tree (pack file)' = 'pack', ); my $alternate = 0; for my $type (sort keys %types) { @@ -2094,6 +2095,7 @@ sub git_serve_snapshot { my %info = ( 'tar.bz2' = [ 'application/x-bzip2', 'bzip2' ], 'tar.gz' = [ 'application/x-gzip', 'gzip' ], + 'pack' = [ 'application/x-git-pack' ], ); if (!exists $info{$st}) { die_error(undef, Unknown snapshot type.); @@ -2101,7 +2103,10 @@ sub git_serve_snapshot { my ($type, $zip) = @{$info{$st}}; print $cgi-header(-type = $type, -attachment = $project-$hash.$st); - open my $fd, -|, $gitbin/git-tar-tree $hash '$project-$hash' | $zip + open my $fd, -|, ($st eq 'pack' ? + $gitbin/git-rev-list --max-count=1 --objects $hash | . + $gitbin/git-pack-objects --stdout : + $gitbin/git-tar-tree $hash '$project-$hash' | $zip) or return; undef $/; print $fd; - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: cogito Mac OS X compatibility
On Fri, Jul 08, 2005 at 07:34:55PM -0400, Bryan Larsen wrote: This appears to be some sort of weird shell thing. I've got bash 3.0 compiling in the background to see if that fixes the problem. Sounds like you're missing stat from coreutils. skimo - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] git-cvsimport-script: leave working directory alone.
git-cvsimport-script: leave working directory alone. --- commit 2eb6d82eaa869a1faf4ba3326fd628f76f9f93a8 tree 3e59c8c298e51a8ae20102b4b139c84c79fa54a0 parent 866d13108e969773347828daa9b7f3476ec70cb8 author Sven Verdoolaege [EMAIL PROTECTED] Mon, 04 Jul 2005 00:43:26 +0200 committer Sven Verdoolaege [EMAIL PROTECTED] Mon, 04 Jul 2005 00:43:26 +0200 git-cvsimport-script | 81 ++ 1 files changed, 48 insertions(+), 33 deletions(-) diff --git a/git-cvsimport-script b/git-cvsimport-script --- a/git-cvsimport-script +++ b/git-cvsimport-script @@ -80,6 +80,8 @@ package CVSconn; # Basic CVS dialog. # We're only interested in connecting and downloading, so ... +use File::Spec; +use File::Temp qw(tempfile); use POSIX qw(strftime dup2); sub new { @@ -231,11 +233,11 @@ sub _file { sub _line { # Read a line from the server. # ... except that 'line' may be an entire file. ;-) - my($self) = @_; + my($self, $fh) = @_; die Not in lines unless defined $self-{'lines'}; my $line; - my $res=; + my $res=0; while(defined($line = $self-readline())) { # M U gnupg-cvs-rep/AUTHORS # Updated gnupg-cvs-rep/ @@ -255,16 +257,18 @@ sub _line { chomp $cnt; die Duh: Filesize $cnt if $cnt !~ /^\d+$/; $line=; - $res=; + $res=0; while($cnt) { my $buf; my $num = $self-{'socketi'}-read($buf,$cnt); die Server: Filesize $cnt: $num: $!\n if not defined $num or $num=0; - $res .= $buf; + print $fh $buf; + $res += $num; $cnt -= $num; } } elsif($line =~ s/^ //) { - $res .= $line; + print $fh $line; + $res += length($line); } elsif($line =~ /^M\b/) { # output, do nothing } elsif($line =~ /^Mbinary\b/) { @@ -277,7 +281,8 @@ sub _line { my $buf; my $num = $self-{'socketi'}-read($buf,$cnt); die S: Mbinary $cnt: $num: $!\n if not defined $num or $num=0; - $res .= $buf; + print $fh $buf; + $res += $num; $cnt -= $num; } } else { @@ -297,18 +302,21 @@ sub file { my($self,$fn,$rev) = @_; my $res; - if ($self-_file($fn,$rev)) { - $res = $self-_line(); - return $res if defined $res; + my ($fh, $name) = tempfile('gitcvs.XX', + DIR = File::Spec-tmpdir(), UNLINK = 1); + + $self-_file($fn,$rev) and $res = $self-_line($fh); + + if (!defined $res) { + # retry + $self-conn(); + $self-_file($fn,$rev) + or die No file command send\n; + $res = $self-_line($fh); + die No input: $fn $rev\n unless defined $res; } - # retry - $self-conn(); - $self-_file($fn,$rev) - or die No file command send\n; - $res = $self-_line(); - die No input: $fn $rev\n unless defined $res; - return $res; + return ($name, $res); } @@ -457,13 +465,14 @@ my $commit = sub { } while(@new) { my @n2; - if(@new 55) { - @n2 = splice(@new,0,50); + if(@new 12) { + @n2 = splice(@new,0,10); } else { @n2 = @new; @new = (); } - system(git-update-cache,--add,--,@n2); + system(git-update-cache,--add, + (map { ('--cacheinfo', @$_) } @n2)); die Cannot add files: $?\n if $?; } @@ -631,7 +640,7 @@ while(CVS) { } if(($ancestor || $branch) ne $last_branch) { print Switching from $last_branch to $branch\n if $opt_v; - system(git-read-tree,-m,-u,$last_branch,$branch); + system(git-read-tree,-m,$last_branch,$branch); die read-tree failed: $?\n if $?; } if($branch ne $last_branch) { @@ -648,17 +657,16 @@ while(CVS) { my $fn = $1; my $rev = $3; $fn =~ s#^/+##; - my $data = $cvs-file($fn,$rev); - print .($init ? New : Update). $fn: .length($data). bytes.\n if $opt_v; - mkpath
[PATCH] git-cvsimport-script: use private index.
git-cvsimport-script: use private index. --- commit 79ee456cf222982f7ee3f003440c57b5f7cffa8b tree c27c7f8bafa48d81a4d9f7562b851681984a9c7e parent 2eb6d82eaa869a1faf4ba3326fd628f76f9f93a8 author Sven Verdoolaege [EMAIL PROTECTED] Mon, 04 Jul 2005 13:36:59 +0200 committer Sven Verdoolaege [EMAIL PROTECTED] Mon, 04 Jul 2005 13:36:59 +0200 git-cvsimport-script | 43 +++ 1 files changed, 23 insertions(+), 20 deletions(-) diff --git a/git-cvsimport-script b/git-cvsimport-script --- a/git-cvsimport-script +++ b/git-cvsimport-script @@ -16,6 +16,8 @@ use strict; use warnings; use Getopt::Std; +use File::Spec; +use File::Temp qw(tempfile); use File::Path qw(mkpath); use File::Basename qw(basename dirname); use Time::Local; @@ -377,6 +379,12 @@ my %branch_date; my $git_dir = $ENV{GIT_DIR} || .git; $git_dir = getwd()./.$git_dir unless $git_dir =~ m#^/#; $ENV{GIT_DIR} = $git_dir; +my $orig_git_index; +$orig_git_index = $ENV{GIT_INDEX_FILE} if exists $ENV{GIT_INDEX_FILE}; +my ($git_ih, $git_index) = tempfile('gitXX', SUFFIX = '.idx', + DIR = File::Spec-tmpdir()); +close ($git_ih); +$ENV{GIT_INDEX_FILE} = $git_index; unless(-d $git_dir) { system(git-init-db); die Cannot init the GIT db at $git_tree: $?\n if $?; @@ -398,6 +406,9 @@ unless(-d $git_dir) { } $orig_branch = $last_branch; + # populate index + system('git-read-tree', $last_branch); + # Get the last import timestamps opendir(D,$git_dir/refs/heads); while(defined(my $head = readdir(D))) { @@ -643,11 +654,6 @@ while(CVS) { system(git-read-tree,-m,$last_branch,$branch); die read-tree failed: $?\n if $?; } - if($branch ne $last_branch) { - unlink($git_dir/HEAD); - symlink(refs/heads/$branch,$git_dir/HEAD); - $last_branch = $branch; - } $state = 9; } elsif($state == 8) { $logmsg .= $_\n; @@ -686,26 +692,23 @@ while(CVS) { } $commit() if $branch and $state != 11; +unlink($git_index); + # Now switch back to the branch we were in before all of this happened if($orig_branch) { - print DONE; switching back to $orig_branch\n if $opt_v; + print DONE\n if $opt_v; } else { $orig_branch = master; print DONE; creating $orig_branch branch\n if $opt_v; system(cp,$git_dir/refs/heads/$opt_o,$git_dir/refs/heads/master) unless -f $git_dir/refs/heads/master; + unlink($git_dir/HEAD); + symlink(refs/heads/$orig_branch,$git_dir/HEAD); + if (defined $orig_git_index) { + $ENV{GIT_INDEX_FILE} = $orig_git_index; + } else { + delete $ENV{GIT_INDEX_FILE}; + } + system('git checkout'); + die checkout failed: $?\n if $?; } - -if ($orig_branch) { - system(git-read-tree,$last_branch); - die read-tree failed: $?\n if $?; -} else { - system('git-read-tree', $orig_branch); - die read-tree failed: $?\n if $?; - system('git-checkout-cache', '-a'); - die checkout-cache failed: $?\n if $?; -} - -unlink($git_dir/HEAD); -symlink(refs/heads/$orig_branch,$git_dir/HEAD); - - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] cvsimport: rewritten in Perl
On Thu, Jun 30, 2005 at 11:00:23PM +0200, Matthias Urlichs wrote: Sven Verdoolaege: It would also be nice if the user could pass extra options to cvsps (notably '-z'). Ditto. ;-) Why not an explicit '-z' option as in the current git-cvsimport-script ? skimo - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] cvsimport: rewritten in Perl
On Mon, Jul 04, 2005 at 03:53:27PM +0200, Matthias Urlichs wrote: Hi, Sven Verdoolaege: Why not an explicit '-z' option as in the current git-cvsimport-script ? Because my code doesn't support compressed cvs connections: a -z that doesn't work except for the rlog part would be a lie. I was talking about the cvsps '-z' option (see current git-cvsimport-script). Are you saying you want to reserve that option to signify compressed cvs connections ? skimo - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] git-cvsimport-script: fix branch switching
git-cvsimport-script: fix branch switching Previous patch broke branch switching. --- commit 46e63efc072bc440e4c6aad33d3157b70f5172b6 tree 2c4fd7286e29e6041808d07874ef2151e3876676 parent 79ee456cf222982f7ee3f003440c57b5f7cffa8b author Sven Verdoolaege [EMAIL PROTECTED] Mon, 04 Jul 2005 15:28:36 +0200 committer Sven Verdoolaege [EMAIL PROTECTED] Mon, 04 Jul 2005 15:28:36 +0200 git-cvsimport-script |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/git-cvsimport-script b/git-cvsimport-script --- a/git-cvsimport-script +++ b/git-cvsimport-script @@ -651,9 +651,10 @@ while(CVS) { } if(($ancestor || $branch) ne $last_branch) { print Switching from $last_branch to $branch\n if $opt_v; - system(git-read-tree,-m,$last_branch,$branch); + system(git-read-tree, $branch); die read-tree failed: $?\n if $?; } + $last_branch = $branch if $branch ne $last_branch; $state = 9; } elsif($state == 8) { $logmsg .= $_\n; - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] git-cvsimport-script: update cvsps cache instead of rebuilding it
git-cvsimport-script: update cvsps cache instead of rebuilding it Updating the cache is sufficient for most purposes. If users really want to rebuild the cache, they can specify the option themselves. --- commit 6e7e37b0bfc921aa1f0cb30560fc128e87a41966 tree 12a9303d4ba4566d9e081b2c375648685ce41e93 parent 46e63efc072bc440e4c6aad33d3157b70f5172b6 author Sven Verdoolaege [EMAIL PROTECTED] Mon, 04 Jul 2005 15:35:30 +0200 committer Sven Verdoolaege [EMAIL PROTECTED] Mon, 04 Jul 2005 15:35:30 +0200 git-cvsimport-script |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/git-cvsimport-script b/git-cvsimport-script --- a/git-cvsimport-script +++ b/git-cvsimport-script @@ -436,7 +436,7 @@ die Cannot fork: $!\n unless defined $ unless($pid) { my @opt; @opt = split(/,/,$opt_p) if defined $opt_p; - exec(cvsps,@opt,-x,-A,--cvs-direct,'--root',$opt_d,$cvs_tree); + exec(cvsps,@opt,-u,-A,--cvs-direct,'--root',$opt_d,$cvs_tree); die Could not start cvsps: $!\n; } - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html