]> OCCT Git - occt.git/commitdiff
Update
authorinv <igor.nazarov@opencascade.com>
Thu, 3 Nov 2022 19:14:09 +0000 (22:14 +0300)
committerinv <igor.nazarov@opencascade.com>
Fri, 4 Nov 2022 10:02:08 +0000 (13:02 +0300)
get.sh

diff --git a/get.sh b/get.sh
index 01fd074ec1869f8246f8661f1e812d30f8c68b83..44a2af635356bd8eb8d8788cceebed171328c2b0 100644 (file)
--- a/get.sh
+++ b/get.sh
@@ -1,9 +1,27 @@
 #!/bin/bash
+
+problem_file=Adaptor2d_Curve2d.cxx
+
 list="master integration"
+echo "Getting branches hash"
 for name in $list ; do
     echo $name
     export shorthash_$name=$(git rev-parse $name)
     echo shorthash_$name=$(eval echo "\$shorthash_${name}")
 done
 
-#echo shorthash_master=$shorthash_master
+list=$(git rev-list --ancestry-path ${shorthash_master}..${shorthash_integration})
+
+for hash in $list ; do    
+    list_changed_files=$(git diff-tree --no-commit-id --name-only -r $hash | sed 's/\// /g' | awk '{ print $NF }')
+    for changed_file in $list_changed_files; do
+        echo problem_file=$problem_file
+        echo changed_file=$changed_file
+        if [ "$problem_file" == "$changed_file" ] ; then
+            echo Reverting: 
+            echo $(git log -1 --format=oneline $hash)
+            # git revert $hash
+            git rebase --onto $hash^ $hash
+        fi
+    done
+done
\ No newline at end of file