git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cvsserver: make the output of 'update' more compatible with cvs.
@ 2009-12-03 20:12 Sergei Organov
  2009-12-05 23:48 ` mmogilvi_git
  2009-12-07 11:11 ` [PATCH v2] " Sergei Organov
  0 siblings, 2 replies; 8+ messages in thread
From: Sergei Organov @ 2009-12-03 20:12 UTC (permalink / raw)
  To: git; +Cc: gitster

Native cvs update outputs the string "cvs update: Updating <DIR>" for
every directory it processes (to stderr). This is used, e.g., by emacs
pcl-cvs to split files by directory. This commit implements this
feature in cvsserver.
---
 git-cvsserver.perl |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 6dc45f5..5994951 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -981,10 +981,22 @@ sub req_update
 
     #$log->debug("update state : " . Dumper($state));
 
+    my $last_dirname = "///";
+    
     # foreach file specified on the command line ...
     foreach my $filename ( @{$state->{args}} )
     {
         $filename = filecleanup($filename);
+        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";
+        }
 
         $log->debug("Processing file $filename");
 
-- 
1.6.6.rc0.67.g68b144.dirty

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-12-31 20:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-03 20:12 [PATCH] cvsserver: make the output of 'update' more compatible with cvs Sergei Organov
2009-12-05 23:48 ` mmogilvi_git
2009-12-07  8:27   ` Sergei Organov
2009-12-07 11:11 ` [PATCH v2] " Sergei Organov
2009-12-30 13:41   ` Nanako Shiraishi
2009-12-31  6:47     ` Junio C Hamano
2009-12-31 15:20       ` Martin Langhoff
2009-12-31 20:14         ` Junio C Hamano

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).