OLD | NEW |
---|---|
1 @echo off | 1 @echo off |
2 :: Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 :: Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 :: Use of this source code is governed by a BSD-style license that can be | 3 :: Use of this source code is governed by a BSD-style license that can be |
4 :: found in the LICENSE file. | 4 :: found in the LICENSE file. |
5 | 5 |
6 :: This batch file will try to sync the root directory. | 6 :: This batch file will try to sync the root directory. |
7 | 7 |
8 setlocal | 8 setlocal |
9 | 9 |
10 :: Will download svn and python. | 10 :: Will download svn and python. |
(...skipping 13 matching lines...) Expand all Loading... | |
24 goto :EOF | 24 goto :EOF |
25 | 25 |
26 | 26 |
27 :SVN_UPDATE | 27 :SVN_UPDATE |
28 call svn up -q "%~dp0." | 28 call svn up -q "%~dp0." |
29 goto :EOF | 29 goto :EOF |
30 | 30 |
31 | 31 |
32 :GIT_UPDATE | 32 :GIT_UPDATE |
33 cd /d "%~dp0." | 33 cd /d "%~dp0." |
34 call git config remote.origin.fetch > NUL | |
M-A Ruel
2012/04/29 00:49:08
I prefer to do the reverse order of the check. Fir
cmp
2012/04/29 00:57:03
I asked M-A over IM if he would explain why he wou
| |
35 if errorlevel 1 goto :GIT_SVN_UPDATE | |
36 call git fetch -q origin | |
37 call git rebase -q origin | |
38 goto :EOF | |
39 | |
40 :GIT_SVN_UPDATE | |
41 cd /d "%~dp0." | |
34 call git svn rebase -q -q | 42 call git svn rebase -q -q |
35 goto :EOF | 43 goto :EOF |
OLD | NEW |