diff options
author | Sergei Organov <osv@javad.com> | 2009-12-07 14:11:44 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-12-31 12:15:01 -0800 |
commit | 8e4c4e7dc322bf6a2cf468152ea71eff26ebc034 (patch) | |
tree | 9ce3576e76a5c3a27b638ae5abf78593c528cddb /git-cvsserver.perl | |
parent | 902f235378cb2b2f6dd5dd664b9630c95321f0ae (diff) | |
download | git-8e4c4e7dc322bf6a2cf468152ea71eff26ebc034.tar.gz |
cvsserver: make the output of 'update' more compatible with cvs.
Native cvs update outputs the string "cvs update: Updating <DIR>" for
every directory it processes (to stderr) unless -q or -Q is given on
comman-line. This is used, e.g., by emacs pcl-cvs to split files by
directory. This commit implements this feature in cvsserver.
Signed-off-by: Sergei Organov <osv@javad.com>
Acked-by: Martin Langhoff <martin.langhoff@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-x | git-cvsserver.perl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 6dc45f5d45..15da2789e0 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -981,6 +981,8 @@ sub req_update #$log->debug("update state : " . Dumper($state)); + my $last_dirname = "///"; + # foreach file specified on the command line ... foreach my $filename ( @{$state->{args}} ) { @@ -988,6 +990,20 @@ sub req_update $log->debug("Processing file $filename"); + unless ( $state->{globaloptions}{-Q} || $state->{globaloptions}{-q} ) + { + my $cur_dirname = dirname($filename); + if ( $cur_dirname ne $last_dirname ) + { + $last_dirname = $cur_dirname; + if ( $cur_dirname eq "" ) + { + $cur_dirname = "."; + } + print "E cvs update: Updating $cur_dirname\n"; + } + } + # if we have a -C we should pretend we never saw modified stuff if ( exists ( $state->{opt}{C} ) ) { |