Created
November 30, 2018 15:41
-
-
Save gijsk/231be8b4e9a1b033c8144f842d115bbb to your computer and use it in GitHub Desktop.
Bash function that rebases all draft branches from rev 1 to rev 2. Useful for keeping sets of patches updated to m-c.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rebase_all_drafts() { | |
local TO_REBASE=`hg log -r "draft() & children($1)" --template '{node}\n'` | |
while read -r line; do | |
echo "Running: hg rebase -s $line -d $2" | |
hg rebase -s "$line" -d $2 | |
done <<< "$TO_REBASE" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment