Created
January 20, 2012 03:44
-
-
Save dredix/1644847 to your computer and use it in GitHub Desktop.
Copy the files added and modified since the last commit from a mercurial repository to the target directory.
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
REM HGCOPY: Copy the files added and modified since the last | |
REM commit from a mercurial repository to the target directory. | |
REM Syntax: hgcopy [dest_path] | |
@echo off | |
if [%1]==[] goto:Syntax | |
REM Only copy added and modified files. | |
for /F "" %%I in ('hg st -man') do call :Copyfile %%I %1\%%I | |
goto:eof | |
:Copyfile | |
if not exist "%~dp2" md "%~dp2" | |
copy /y "%1" "%2" | |
goto:eof | |
:Syntax | |
echo Syntax: hgcopy [dest_path] | |
goto:eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment