chg: pull --rebase the branches of interest, this should avoid issues with modified...
[buildfarm-client.git] / EximBuild / SCM.pm
index becd24e037ea73a6c7e3b65bf3434180763b3a07..cca3ed7e5f35eac74298d339ff4b0c671e1df6e4 100644 (file)
@@ -1,6 +1,7 @@
 use strict;
 
 use File::Find;
+use Cwd;
 
 =comment
 
@@ -8,7 +9,7 @@ Copyright (c) 2003-2010, Andrew Dunstan
 
 See accompanying License file for license details
 
-=cut 
+=cut
 
 ##########################################################################
 #
@@ -210,18 +211,18 @@ sub checkout
             unshift @ret, "git not found in path\n";
             main::send_result("$target-Git",$status,\@ret);
         }
-        
+
         chdir $target;
         my @branches = `git branch 2>&1`;
-        unless (grep {/^\* bf_$branch$/} @branches)
+        unless (grep {/^\* bf_\Q$branch\E$/} @branches)
         {
             chdir '..';
             print "Missing checked out branch bf_$branch:\n",@branches
               if ($main::verbose);
-            unshift @branches,"Missing checked out branch bf_$branch:\n";
+            unshift @branches,"Missing checked out branch bf_$branch in " . cwd() . ":\n";
             main::send_result("$target-Git",$status,\@branches);
         }
-        my @pulllog = `git pull 2>&1`;
+        my @pulllog = `git pull --rebase 2>&1`;
         push(@gitlog,@pulllog);
         chdir '..';
     }