threads / patch / 7151

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

Subject: [PATCH] cvsserver: Use Merged response instead of Update-existing for merged files

## tl;dr

3 messages between Mar 6, 2007 and Mar 11, 2007. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Frank Lichtenheld· Mar 6, 2007, 09:42 UTC · lore

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.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
---
 git-cvsserver.perl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Show changes to git-cvsserver.perl +3 −3
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 1bf892e..65fcc84 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -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";
-- 
1.5.0.2
Junio C Hamano· Mar 10, 2007, 01:37 UTC · re: Frank Lichtenheld · lore

Re: [PATCH] cvsserver: Use Merged response instead of Update-existing for merged files

Frank Lichtenheld <frank@lichtenheld.de> writes:
> 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?

Show 35 quoted lines
> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
> ---
>  git-cvsserver.perl |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/git-cvsserver.perl b/git-cvsserver.perl
> index 1bf892e..65fcc84 100755
> --- a/git-cvsserver.perl
> +++ b/git-cvsserver.perl
> @@ -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";
> -- 
> 1.5.0.2
Martin Langhoff· Mar 11, 2007, 22:21 UTC · re: Junio C Hamano · lore

Re: [PATCH] cvsserver: Use Merged response instead of Update-existing for merged files

On 3/10/07, Junio C Hamano <junkio@cox.net> wrote:
Show 8 quoted lines
> Frank Lichtenheld <frank@lichtenheld.de> writes:
>
> > 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

← back to recent threads