フィルターのクリア

Is it possible to do a SVN update from command window / m-files?

10 ビュー (過去 30 日間)
Robert
Robert 2017 年 2 月 27 日
回答済み: Per-Anders Ekstrom 2023 年 4 月 2 日
Is there any "SVN-update from repository" command that can be used from command window? The only thing I find in the documentation is the "right click and choose Source control --> SVN update" or similar.

採用された回答

Guillaume
Guillaume 2017 年 2 月 27 日
I don't think there is.
If you're on Windows, I would just install TortoiseSVN and invoke the command line tools that come with it:
%once TortoiseSVN and command line tools are installed:
system(['svn update ', pwd])
  2 件のコメント
Arpeet Sojitra
Arpeet Sojitra 2020 年 5 月 11 日
I have done same thing what you here wrote but the problem is when I write :
system (['svn update',pwd])
I got answer like that:
Unknown subcommand: 'updateC:\Users\Arpeet\Desktop\matlab'
Type 'svn help' for usage.
ans =
1
Is that right or wrong?
system (['svn update'])
the answer :
Updating '.':
At revision 9.
ans =
0
but Boolean expression 0 is false and 1 is true.
Tom Hawkins
Tom Hawkins 2021 年 4 月 12 日
編集済み: Tom Hawkins 2021 年 4 月 12 日
Arpeet, in your first example, it looks as if you didn't leave a space after svn update. A more up-to-date way of writing this might be
system(sprintf('svn update %s', pwd))
If you look at the help for system you'll see that it returns a status of 0 if the command executed successfully, or a non-zero value if it encountered an error.

サインインしてコメントする。

その他の回答 (1 件)

Per-Anders Ekstrom
Per-Anders Ekstrom 2023 年 4 月 2 日
Maybe a little late answer for you, but this code might help anybody that wants to perform SVN-operations from the command line. The code make use of the already built-in subversion support (SVNKit) that is used by the graphical user interface, and thus, no installing of any external SVN command-line clients is required.
For an update of the current working directory:
>> jsvn update .

カテゴリ

Help Center および File ExchangeSource Control Integration についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by