0

使用 2014.1.85.4506 API 版本。只是尝试从仓库中检索文件以在工作区中打开。

我有一个带有局部变量string localPathstring depotPathstring clientPath(与 相同localPathRepository repo和的对象Connection con

因此,我的代码如下所示:

// ...
DepotPath       depotSpec  = new DepotPath(depoPath);
ClientPath      clientSpec = new ClientPath(clientPath);
LocalPath       localSpec  = new LocalPath(localPath);

FileSpec        fileSpec   = new FileSpec(depoSpec, clientSpec, localSpec, VersionSpec.Head);

IList<FileSpec> fileSpecs  = new List<FileSpec>();
fileSpecs.Add(fileSpec);

IList<FileSpec> synced     = con.Client.SyncFiles(fileSpecs, null);
// ...

并且synced总是以null. 有什么想法吗?

4

1 回答 1

0

只是为了确保 SyncFiles 返回 null 还是空列表?

如果它返回一个空列表,那么当我已经在本地拥有最新版本时就会发生这种情况。因为没有要同步的内容,所以它返回一个空列表。

于 2014-07-01T21:09:20.703 回答