-
-
Save clindsey/289997 to your computer and use it in GitHub Desktop.
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
| try | |
| set visible of window "SVNwindow" to true | |
| tell application "Finder" | |
| activate | |
| set theWin to window 1 | |
| set thePath to (POSIX path of (target of theWin as alias)) | |
| try | |
| set svnAdd to do shell script "cd " & thePath & ";svn add * --force;" | |
| set svnUp to do shell script "cd " & thePath & ";svn update;" | |
| set svnStatus to do shell script "cd " & thePath & ";svn status | awk '{print $1, $2}'" | |
| set visible of window "SVNwindow" to false | |
| if (svnStatus) then | |
| display dialog thePath & " | |
| " & svnAdd & " | |
| " & svnUp & " | |
| " & svnStatus & " | |
| Enter message:" default answer msg buttons {"Cancel", "Commit"} default button 2 | |
| if the button returned of the result is "Commit" then | |
| try | |
| set svnCommit to do shell script "cd " & thePath & ";svn commit -m \"" & msg & "\";" | |
| display dialog svnCommit | |
| on error svnerror | |
| display dialog svnerror | |
| end try | |
| end if | |
| else | |
| display dialog thePath & " | |
| " & svnAdd & " | |
| " & svnUp | |
| end if | |
| on error the_error | |
| display dialog the_error | |
| end try | |
| end tell | |
| end try |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment