SubWCRev.exe - Won't Work on Files in My Documents

3 ビュー (過去 30 日間)
Alex
Alex 2015 年 9 月 17 日
コメント済み: Steven Lord 2015 年 9 月 17 日
I want to check the SVN revision of a file in my working copy. I found some helpful code elsewhere on Matlab Exchange:
However, when I try evalc on a directory or file in 'My Documents', SubWCRev.exe doesn't seem to be able to identify the rev... I suspect it has something to do with admin privileges. It'll find the rev just fine on a copy of the repo stored elsewhere on my PC (e.g. root directory, Desktop, etc). Any ideas? Here's what I'm doing:
file = 'C:\Users\myusername\Documents\myrepository';
subwcrev = 'SubWCRev.exe';
results = evalc(sprintf('!%s %s',subwcrev,file));
Thanks in advance!
  1 件のコメント
Guillaume
Guillaume 2015 年 9 月 17 日
What does subWCRev return then?
Which version of tsvn?

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

採用された回答

Walter Roberson
Walter Roberson 2015 年 9 月 17 日
results = system(sprintf('"%s" "%s"',subwcrev,file));

その他の回答 (1 件)

Steven Lord
Steven Lord 2015 年 9 月 17 日
Which release of MATLAB are you using? We introduced Git and Subversion source control integration through the Current Folder browser in release R2014b. If you have that release or later, check out the first item in the Desktop section of the Release Notes for that release of MATLAB for more information to see if it does what you need and/or want.
  2 件のコメント
Alex
Alex 2015 年 9 月 17 日
I'm using R2015a. I like the SVN integration in the GUI, but would like to execute a Matlab function that'll return my SVN revision, e.g. as a string. SubWCRev.exe is one way I've found that works (in most cases). Is there an existing function within Matlab that already does this?
Steven Lord
Steven Lord 2015 年 9 月 17 日
I'm not certain. I did a quick search through the documentation and didn't see anything, but I could have missed it. This seems like a reasonable question to ask Technical Support, and if there is no such function you could ask them to enter your request for it into the enhancement database.

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

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by