Created
August 9, 2017 13:53
-
-
Save gbrian/e6e68ded9fe7d031a102f4b09de238cd to your computer and use it in GitHub Desktop.
Create new mercurial branch associated to a trello card
This file contains 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
@echo off | |
if "%1" == "" goto error | |
SET card=%1 | |
For %%A in ("%card%") do ( | |
Set Branch=%%~nxA | |
) | |
echo.Branch is: %Branch% | |
hg pull | |
echo "Update to release --clean" | |
hg update --clean release | |
echo "Create branch:%Branch%" | |
hg branch "%Branch%" | |
IF %ERRORLEVEL% NEQ 0 goto errorBranch | |
hg commit -m "%card%" | |
goto exit | |
:errorBranch | |
echo "Error creating branch" | |
echo | |
:error | |
echo "USAGE trellobranch trello_card_link | |
echo | |
echo | |
echo "Creates a branch based on the trello card" | |
echo "Example: trellobranch https://trello.com/c/7WJJJJJ/7-my-trello-card" | |
:exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment