Git development
 help / color / mirror / Atom feed
From: Eugen Konkov <kes-kes@yandex.ru>
To: Git Mailing List <git@vger.kernel.org>
Subject: Why "Updated upstream" block is so small?
Date: Sat, 29 Jun 2019 13:05:45 +0300	[thread overview]
Message-ID: <1936584831.20190629130545@yandex.ru> (raw)

Hello

I want to apply this patch from stage:

diff --git a/lib/App/Schema/Result/Invoice.pm b/lib/App/Schema/Result/Invoice.pm
index 0176916f..0ce2d698 100644
--- a/lib/App/Schema/Result/Invoice.pm
+++ b/lib/App/Schema/Result/Invoice.pm
@@ -219,14 +219,14 @@ sub new_package {
     # my $package_type =  $package->Invoice->Order->Tariff->type;
     my $pass =  $package->password;
     ($pass) =  (`smbencrypt $pass` =~ /([^\s]+)$/s);
-    $sth->execute( $package->login, 'NT-Password', ':=', $pass );
+    $sth->execute( $package->login, 'NT-Password', ':=', $pass //'');
     $sth->execute( $package->login, 'NAS-Identifier', '=~', 'ppp' );
 
     $sth =  $radius_dbh->prepare(
         "INSERT INTO radreply ( username, attribute, op, value, nasip) values ( ?, 'Framed-IP-Address', '=', ?, ? )"
     );
     my $ip =  $package->Ips->first;
-    $sth->execute( $package->login, $ip->ip, $ip->Listener->first->nas_ip );
+    # $sth->execute( $package->login, $ip->ip, $ip->Listener->first->nas_ip );
 
     $radius_dbh->commit;
     # NOTICE: This is a bit inconsistent


after applying I get merge conflict:


diff --cc lib/App/Schema/Result/Invoice.pm
index e3f55654,0ce2d698..00000000
--- a/lib/App/Schema/Result/Invoice.pm
+++ b/lib/App/Schema/Result/Invoice.pm
@@@ -211,33 -204,34 +211,87 @@@ sub new_package 
     }
  
     ## Create radius account
 +   eval{
         my $radius_dbh =  $self->result_source->storage->schema->{ _radius_dbh };
 -   if( !$radius_dbh->FETCH('AutoCommit') ) {
 +       $radius_dbh->begin_work;
 +       my $sth =  $radius_dbh->prepare(
 +           "INSERT INTO radusergroup ( username, groupname, priority ) values (?,'static',1)"
 +       );
 +       $sth->execute( $package->login );
 +
 +       $sth =  $radius_dbh->prepare(
 +           "INSERT INTO radcheck ( username, attribute, op, value ) values ( ?, ?, ?, ? )"
 +       );
 +       # my $package_type =  $package->Invoice->Order->Tariff->type;
 +       my $pass =  $package->password;
 +       ($pass) =  (`smbencrypt $pass` =~ /([^\s]+)$/s);
 +       $sth->execute( $package->login, 'NT-Password', ':=', $pass //'' );
 +       $sth->execute( $package->login, 'NAS-Identifier', '=~', 'ppp' );
 +
 +       $sth =  $radius_dbh->prepare(
 +           "INSERT INTO radreply ( username, attribute, op, value, nasip) values ( ?, 'Framed-IP-Address', '=', ?, ? )"
 +       );
 +       my $ip =  $package->Ips->first;
 +       $sth->execute( $package->login, $ip->ip, $ip->Listener->first->nas_ip );
 +
         $radius_dbh->commit;
++<<<<<<< Updated upstream
 +       # NOTICE: This is a bit inconsistent
 +       # if whole payment failed we will have radius account without payment
 +   };
++||||||| merged common ancestors
++   }
++   $radius_dbh->begin_work;
++   my $sth =  $radius_dbh->prepare(
++       "INSERT INTO radusergroup ( username, groupname, priority ) values (?,'static',1)"
++   );
++   $sth->execute( $package->login );
++
++   $sth =  $radius_dbh->prepare(
++       "INSERT INTO radcheck ( username, attribute, op, value ) values ( ?, ?, ?, ? )"
++   );
++   # my $package_type =  $package->Invoice->Order->Tariff->type;
++   my $pass =  $package->password;
++   ($pass) =  (`smbencrypt $pass` =~ /([^\s]+)$/s);
++   $sth->execute( $package->login, 'NT-Password', ':=', $pass );
++   $sth->execute( $package->login, 'NAS-Identifier', '=~', 'ppp' );
++
++   $sth =  $radius_dbh->prepare(
++       "INSERT INTO radreply ( username, attribute, op, value, nasip) values ( ?, 'Framed-IP-Address', '=', ?, ? )"
++   );
++   my $ip =  $package->Ips->first;
++   $sth->execute( $package->login, $ip->ip, $ip->Listener->first->nas_ip );
++
++   $radius_dbh->commit;
++   # NOTICE: This is a bit inconsistent
++   # if whole payment failed we will have radius account without payment
++=======
+    }
+    $radius_dbh->begin_work;
+    my $sth =  $radius_dbh->prepare(
+        "INSERT INTO radusergroup ( username, groupname, priority ) values (?,'static',1)"
+    );
+    $sth->execute( $package->login );
+ 
+    $sth =  $radius_dbh->prepare(
+        "INSERT INTO radcheck ( username, attribute, op, value ) values ( ?, ?, ?, ? )"
+    );
+    # my $package_type =  $package->Invoice->Order->Tariff->type;
+    my $pass =  $package->password;
+    ($pass) =  (`smbencrypt $pass` =~ /([^\s]+)$/s);
+    $sth->execute( $package->login, 'NT-Password', ':=', $pass //'');
+    $sth->execute( $package->login, 'NAS-Identifier', '=~', 'ppp' );
+ 
+    $sth =  $radius_dbh->prepare(
+        "INSERT INTO radreply ( username, attribute, op, value, nasip) values ( ?, 'Framed-IP-Address', '=', ?, ? )"
+    );
+    my $ip =  $package->Ips->first;
+    # $sth->execute( $package->login, $ip->ip, $ip->Listener->first->nas_ip );
+ 
+    $radius_dbh->commit;
+    # NOTICE: This is a bit inconsistent
+    # if whole payment failed we will have radius account without payment
++>>>>>>> Stashed changes
  
  
     return $package;



Why updated upstream block is so small?

++<<<<<<< Updated upstream
 +       # NOTICE: This is a bit inconsistent
 +       # if whole payment failed we will have radius account without payment
 +   };
++||||||| merged common ancestors

 
I suppose it should start from to line line:

     +       $radius_dbh->begin_work;
     ...
    +    # if whole payment failed we will have radius account without payment




-- 
Best regards,
Eugen Konkov


             reply	other threads:[~2019-06-29 10:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-29 10:05 Eugen Konkov [this message]
2019-06-29 10:23 ` Why "Updated upstream" block is so small? Eugen Konkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1936584831.20190629130545@yandex.ru \
    --to=kes-kes@yandex.ru \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox