-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[develop/fetch] [jsk_robot_startup] Work around update_workspace #1824
base: develop/fetch
Are you sure you want to change the base?
Conversation
52ecc8b
to
084e34c
Compare
1235749
to
5df35e0
Compare
rebased current |
jsk_robot_common/jsk_robot_startup/scripts/update_workspace_main.sh
Outdated
Show resolved
Hide resolved
Co-authored-by: Koki Shinjo <[email protected]>
…r in go-to-kitchen demo
* [jsk_fetch_startup] add write-message-on-message-board to navigation-utils.l * [jsk_fetch_startup] Use write-message-on-message-board in kitchen-demo * Update jsk_fetch_robot/jsk_fetch_startup/euslisp/navigation-utils.l add package existence check for esp_now_ros Co-authored-by: Naoto Tsukamoto <[email protected]> * [jsk_fetch_startup] publish dummy packet before write message on message board * Add more message and debug output * [jsk_fetch_startup] fix error * [jsk_fetch_starup] get rid of dummy message writing * [jsk_fetch_startup] Change enr_message_board address --------- Co-authored-by: Naoto Tsukamoto <[email protected]>
This reverts commit 3ab1283.
@mqcmd196 kindly ping, I would appreciate any comments on the progress of this Pull Request and previous discussions. |
5df35e0
to
4cd5497
Compare
4cd5497
to
7ff6f98
Compare
7ff6f98
to
1c61c3f
Compare
@sktometometo |
I have to check on real robot |
# Forcefully checkout specified branch | ||
wstool foreach -t $WORKSPACE/src --git --shell 'branchname=$(git rev-parse --abbrev-ref HEAD); if [ $branchname != "HEAD" ]; then git reset --hard HEAD; git checkout origin/$branchname; git branch -D $branchname; git checkout -b $branchname --track origin/$branchname; fi' | ||
# When the repository's Spec-Version branch has commits which are not pushed to remote, they are evacuated to another branch | ||
wstool foreach -t $WORKSPACE/src --git --shell 'expected_version=$(wstool info . | grep Spec-Version: | awk '\''{print $2}'\''); current_version=$(git rev-parse --abbrev-ref HEAD); remote_diff_head_origin=$(git rev-list HEAD..origin); remote_diff_origin_head=$(git rev-list origin..HEAD); remote_diff="${remote_diff_head_origin}${remote_diff_origin_head}"; if [ "$expected_version" = "$current_version" ] && [ -n "$remote_diff" ]; then git checkout -b ${expected_version}-patch-$(date +%Y%m%d%H%M%S); git checkout origin/$expected_version; git branch -D $expected_version; git checkout -b $expected_version --track origin/$expected_version; fi' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks almost good!. There is one point to change.
We would like to check rev-list from current HEAD to desired branch in origin
, but with this case, origin
sometimes stands for another branch, (e.g. it stands for origin/master
at jsk_robot
, not develop/fetch
)
So it would be nice to use origin/$(expected_version)
instead of origin
.
# Forcefully checkout specified branch | ||
wstool foreach -t $WORKSPACE/src --git --shell 'branchname=$(git rev-parse --abbrev-ref HEAD); if [ $branchname != "HEAD" ]; then git reset --hard HEAD; git checkout origin/$branchname; git branch -D $branchname; git checkout -b $branchname --track origin/$branchname; fi' | ||
# When the repository's Spec-Version branch has commits which are not pushed to remote, they are evacuated to another branch | ||
wstool foreach -t $WORKSPACE/src --git --shell 'expected_version=$(wstool info . | grep Spec-Version: | awk '\''{print $2}'\''); current_version=$(git rev-parse --abbrev-ref HEAD); remote_diff_head_origin=$(git rev-list HEAD..origin); remote_diff_origin_head=$(git rev-list origin..HEAD); remote_diff="${remote_diff_head_origin}${remote_diff_origin_head}"; if [ "$expected_version" = "$current_version" ] && [ -n "$remote_diff" ]; then git checkout -b ${expected_version}-patch-$(date +%Y%m%d%H%M%S); git checkout origin/$expected_version; git branch -D $expected_version; git checkout -b $expected_version --track origin/$expected_version; fi' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wstool foreach -t $WORKSPACE/src --git --shell 'expected_version=$(wstool info . | grep Spec-Version: | awk '\''{print $2}'\''); current_version=$(git rev-parse --abbrev-ref HEAD); remote_diff_head_origin=$(git rev-list HEAD..origin); remote_diff_origin_head=$(git rev-list origin..HEAD); remote_diff="${remote_diff_head_origin}${remote_diff_origin_head}"; if [ "$expected_version" = "$current_version" ] && [ -n "$remote_diff" ]; then git checkout -b ${expected_version}-patch-$(date +%Y%m%d%H%M%S); git checkout origin/$expected_version; git branch -D $expected_version; git checkout -b $expected_version --track origin/$expected_version; fi' | |
wstool foreach -t $WORKSPACE/src --git --shell 'expected_version=$(wstool info . | grep Spec-Version: | awk '\''{print $2}'\''); current_version=$(git rev-parse --abbrev-ref HEAD); remote_diff_head_origin=$(git rev-list HEAD..origin/$expected_version); remote_diff_origin_head=$(git rev-list origin/$expected_version..HEAD); remote_diff="${remote_diff_head_origin}${remote_diff_origin_head}"; if [ "$expected_version" = "$current_version" ] && [ -n "$remote_diff" ]; then git checkout -b ${expected_version}-patch-$(date +%Y%m%d%H%M%S); git checkout origin/$expected_version; git branch -D $expected_version; git checkout -b $expected_version --track origin/$expected_version; fi' |
Let's merge and check with a robot. |
After tomorrow, I'll go to the lab and check it. |
a94818f
to
23037db
Compare
Background
src/jsk-ros-pkg/jsk_robot
develop/fetch
, the changes will disappear.What has been changed?
git stash -u
insteadwstool update -t $WORKSPACE/src $(rospack find jsk_robot_startup)/../.. --delete-changed-uris
instead ofwstool update -t $WORKSPACE/src jsk-ros-pkg/jsk_robot --delete-changed-uris
develop/fetch-patch-${current date}