latest pushes
This commit is contained in:
@ -15,7 +15,7 @@ notifications:
|
||||
on_success: change
|
||||
on_failure: always
|
||||
recipients:
|
||||
- pyo@robotis.com
|
||||
- pyo@humanoid_robot.com
|
||||
env:
|
||||
matrix:
|
||||
- ROS_DISTRO=noetic ROS_REPO=ros-shadow-fixed UPSTREAM_WORKSPACE=debian
|
||||
|
31
fix_errors.sh
Executable file
31
fix_errors.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the URL from .git/config
|
||||
git_url=$(git config --get remote.origin.url)
|
||||
|
||||
# Check if a URL is found
|
||||
if [ -z "$git_url" ]; then
|
||||
echo "No remote URL found in .git/config."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Clone the repository into a temporary folder
|
||||
git clone "$git_url" tmp_clone
|
||||
|
||||
# Check if the clone was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
# Remove the existing .git directory if it exists
|
||||
if [ -d ".git" ]; then
|
||||
rm -rf .git
|
||||
fi
|
||||
|
||||
# Copy the .git directory from the clone to the current repository
|
||||
cp -r tmp_clone/.git .
|
||||
|
||||
# Remove the clone directory
|
||||
rm -rf tmp_clone
|
||||
|
||||
echo "Repository cloned and .git directory copied successfully."
|
||||
else
|
||||
echo "Failed to clone the repository."
|
||||
fi
|
@ -1,5 +1,5 @@
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Changelog for package robotis_controller_msgs
|
||||
Changelog for package humanoid_robot_controller_msgs
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
0.3.1 (2023-09-27)
|
||||
@ -43,5 +43,5 @@ Changelog for package robotis_controller_msgs
|
||||
------------------
|
||||
* first public release for Kinetic
|
||||
* modified the package information
|
||||
* added robotis_controller_msgs
|
||||
* added humanoid_robot_controller_msgs
|
||||
* Contributors: Zerom, Pyo
|
@ -2,7 +2,7 @@
|
||||
# Set minimum required version of cmake, project name and compile options
|
||||
################################################################################
|
||||
cmake_minimum_required(VERSION 3.0.2)
|
||||
project(robotis_controller_msgs)
|
||||
project(humanoid_robot_controller_msgs)
|
||||
|
||||
################################################################################
|
||||
# Find catkin packages and libraries for catkin and system dependencies
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<package format="2">
|
||||
<name>robotis_controller_msgs</name>
|
||||
<name>humanoid_robot_controller_msgs</name>
|
||||
<version>0.3.0</version>
|
||||
<description>This package includes ROS messages and services for robotis_framework packages</description>
|
||||
<description>This package includes ROS messages and services for humanoid_robot_framework packages</description>
|
||||
<license>Apache 2.0</license>
|
||||
<maintainer email="ronaldsonbellande@gmail.com">Ronaldson Bellande</maintainer>
|
||||
|
@ -1,5 +1,5 @@
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Changelog for package robotis_humanoid_robot_msgs
|
||||
Changelog for package humanoid_robot_msgs
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
0.3.1 (2023-09-27)
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 0.3.0)
|
||||
project(robotis_humanoid_robot_msgs)
|
||||
project(humanoid_robot_msgs)
|
||||
find_package(catkin REQUIRED)
|
||||
catkin_metapackage()
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<package format="2">
|
||||
<name>robotis_humanoid_robot_msgs</name>
|
||||
<name>humanoid_robot_msgs</name>
|
||||
<version>0.3.0</version>
|
||||
<description>ROS messages packages for the ROBOTIS HUMANOID_ROBOT (meta package)</description>
|
||||
<license>Apache 2.0</license>
|
4
push.sh
Executable file
4
push.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Git push what is already in the repository
|
||||
git pull --no-edit; git fetch; git add .; git commit -am "latest pushes"; git push
|
110
repository_recal.sh
Executable file
110
repository_recal.sh
Executable file
@ -0,0 +1,110 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Git push what is already in the repository
|
||||
git pull --no-edit; git fetch; git add .; git commit -am "latest pushes"; git push
|
||||
|
||||
# Get the current directory
|
||||
current_dir=$(pwd)
|
||||
|
||||
# Read the remote repository URL from .git/config
|
||||
remote_repo_url=$(git -C "$current_dir" config --get remote.origin.url)
|
||||
|
||||
# Create a temporary directory for cloning the repository
|
||||
temp_dir=$(mktemp -d)
|
||||
|
||||
# Clone the repository into the temporary directory without using local references
|
||||
git clone --no-local "$current_dir" "$temp_dir"
|
||||
|
||||
# Switch to the temporary directory
|
||||
cd "$temp_dir"
|
||||
|
||||
# Create a temporary file to store the file list
|
||||
tmp_file=$(mktemp)
|
||||
# Create a temporary file to store the processed commits
|
||||
processed_commits_file=$(mktemp)
|
||||
|
||||
# Function to check if a commit has already been processed
|
||||
is_commit_processed() {
|
||||
local commit="$1"
|
||||
|
||||
# Check if the commit is already processed
|
||||
grep -Fxq "$commit" "$processed_commits_file"
|
||||
}
|
||||
|
||||
# Function to mark a commit as processed
|
||||
mark_commit_processed() {
|
||||
local commit="$1"
|
||||
|
||||
# Mark the commit as processed
|
||||
echo "$commit" >> "$processed_commits_file"
|
||||
}
|
||||
|
||||
# Function to check if a file or folder exists in the repository
|
||||
file_exists_in_repo() {
|
||||
local file_path="$1"
|
||||
|
||||
# Check if the file or folder exists in the repository
|
||||
git ls-tree --name-only -r HEAD | grep -Fxq "$file_path"
|
||||
}
|
||||
|
||||
# Function to process the files and folders in each commit
|
||||
process_commit_files() {
|
||||
local commit="$1"
|
||||
|
||||
# Check if the commit has already been processed
|
||||
if is_commit_processed "$commit"; then
|
||||
echo "Commit $commit already processed. Skipping..."
|
||||
return
|
||||
fi
|
||||
|
||||
# Get the list of files and folders in the commit (including subfolders)
|
||||
git ls-tree --name-only -r "$commit" >> "$tmp_file"
|
||||
|
||||
# Process each file or folder in the commit
|
||||
while IFS= read -r line
|
||||
do
|
||||
# Check if the file or folder exists in the current push
|
||||
if file_exists_in_repo "$line"; then
|
||||
echo "Keeping: $line"
|
||||
else
|
||||
echo "Deleting: $line"
|
||||
git filter-repo --path "$line" --invert-paths
|
||||
fi
|
||||
done < "$tmp_file"
|
||||
|
||||
# Mark the commit as processed
|
||||
mark_commit_processed "$commit"
|
||||
|
||||
# Clear the temporary file
|
||||
> "$tmp_file"
|
||||
}
|
||||
|
||||
# Iterate over each commit in the repository
|
||||
git rev-list --all | while IFS= read -r commit
|
||||
do
|
||||
process_commit_files "$commit"
|
||||
done
|
||||
|
||||
# Push the filtered changes to the original repository
|
||||
git remote add origin "$remote_repo_url"
|
||||
git push --force origin main
|
||||
|
||||
# Perform a history rewrite to remove the filtered files
|
||||
git filter-repo --force
|
||||
|
||||
# Fetch the changes from the remote repository
|
||||
git -C "$current_dir" fetch origin
|
||||
|
||||
# Merge the remote changes into the local repository
|
||||
git -C "$current_dir" merge origin/main --no-edit
|
||||
|
||||
# Update the local repository and reduce the size of .git if needed
|
||||
git -C "$current_dir" gc --prune=now
|
||||
git -C "$current_dir" reflog expire --expire=now --all
|
||||
git -C "$current_dir" repack -ad
|
||||
|
||||
# Clean up temporary files and directories
|
||||
cd "$current_dir"
|
||||
rm -rf "$temp_dir"
|
||||
rm "$tmp_file"
|
||||
rm "$processed_commits_file"
|
Reference in New Issue
Block a user