Skip to contentSkip to conversation

cvsserver: Use Merged response instead of Update-existing for merged files

PATCH In review Frank Lichtenheld 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cvsserver: Use Merged response instead of Update-existing for merged files

Using Update-existing leads to the client forgetting about the "locally modified" status of the file which can lead to loss of local changes on later updates.

---
 git-cvsserver.perl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
git-cvsserver.perl +3 -3
index 1bf892e..65fcc84 100755
@@ -957,12 +957,12 @@ sub req_update
             {
                 $log->info("Merged successfully");
                 print "M M $filename\n";
-                $log->debug("Update-existing $dirpart");
+                $log->debug("Merged $dirpart");
 
                 # Don't want to actually _DO_ the update if -n specified
                 unless ( $state->{globaloptions}{-n} )
                 {
-                    print "Update-existing $dirpart\n";
+                    print "Merged $dirpart\n";
                     $log->debug($state->{CVSROOT} . "/$state->{module}/$filename");
                     print $state->{CVSROOT} . "/$state->{module}/$filename\n";
                     my $kopts = kopts_from_path($filepart);
@@ -978,7 +978,7 @@ sub req_update
                 # Don't want to actually _DO_ the update if -n specified
                 unless ( $state->{globaloptions}{-n} )
                 {
-                    print "Update-existing $dirpart\n";
+                    print "Merged $dirpart\n";
                     print $state->{CVSROOT} . "/$state->{module}/$filename\n";
                     my $kopts = kopts_from_path($filepart);
                     print "/$filepart/1.$meta->{revision}/+/$kopts/\n";
Signature · 1 line
1.5.0.2
#1 lore raw
Quoted 3 lines · Frank Lichtenheld

Using Update-existing leads to the client forgetting about the "locally modified" status of the file which can lead to loss of local changes on later updates.

To me, both of these hunks look correct (the first one is clean merge, the second one is merge with conflicts). Ack?

Quoted 35 lines
---
 git-cvsserver.perl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
git-cvsserver.perl +3 -3
index 1bf892e..65fcc84 100755
@@ -957,12 +957,12 @@ sub req_update
             {
                 $log->info("Merged successfully");
                 print "M M $filename\n";
-                $log->debug("Update-existing $dirpart");
+                $log->debug("Merged $dirpart");
 
                 # Don't want to actually _DO_ the update if -n specified
                 unless ( $state->{globaloptions}{-n} )
                 {
-                    print "Update-existing $dirpart\n";
+                    print "Merged $dirpart\n";
                     $log->debug($state->{CVSROOT} . "/$state->{module}/$filename");
                     print $state->{CVSROOT} . "/$state->{module}/$filename\n";
                     my $kopts = kopts_from_path($filepart);
@@ -978,7 +978,7 @@ sub req_update
                 # Don't want to actually _DO_ the update if -n specified
                 unless ( $state->{globaloptions}{-n} )
                 {
-                    print "Update-existing $dirpart\n";
+                    print "Merged $dirpart\n";
                     print $state->{CVSROOT} . "/$state->{module}/$filename\n";
                     my $kopts = kopts_from_path($filepart);
                     print "/$filepart/1.$meta->{revision}/+/$kopts/\n";
Signature · 1 line
1.5.0.2
#2 lore raw
Quoted 8 lines · Junio C Hamano
Quoted 3 lines · Frank Lichtenheld

Using Update-existing leads to the client forgetting about the "locally modified" status of the file which can lead to loss of local changes on later updates.

To me, both of these hunks look correct (the first one is clean merge, the second one is merge with conflicts). Ack?

Ack!

m