Files
git-tfs/GitTfs/Core/ITfsWorkspace.cs
T
Kim Gybels 29fabab81c Fix unshelve
The optimization to prevent downloading of ignored files broke
unshelving[1]. A shelveset is treated as a changeset by git-tfs, but there
is no changeset version for it, so you can't ask the workspace to get a
shelveset by version, instead the shelveset itself needs to be responsible
for populating the workspace with the correct files[2].

[1] 351ed3d69f
[2] 26fe4ad269
2014-04-22 16:02:50 +02:00

60 lines
2.0 KiB
C#

using System;
using System.Collections.Generic;
using Sep.Git.Tfs.Commands;
using Sep.Git.Tfs.Core.TfsInterop;
namespace Sep.Git.Tfs.Core
{
/// <summary>
/// Things needed by code that pends changes to a workspace.
/// </summary>
public interface ITfsWorkspaceModifier
{
string GetLocalPath(string path);
void Add(string path);
void Edit(string path);
void Delete(string path);
void Rename(string pathFrom, string pathTo, string score);
}
/// <summary>
/// All the other tricks workspaces know.
/// </summary>
public interface ITfsWorkspace : ITfsWorkspaceModifier
{
/// <summary>
/// Shelves all pending changes, with the given shelveset name.
/// </summary>
void Shelve(string shelvesetName, bool evaluateCheckinPolicies, Func<string> generateCheckinComment);
/// <summary>
/// Evaluates check-in policies and checks in all pending changes.
/// </summary>
long Checkin(CheckinOptions checkinOptions);
/// <summary>
/// Populates the workspace with a snapshot, as of the given changeset.
/// </summary>
void Get(int changesetId);
/// <summary>
/// Gets the files changed in a given changeset.
/// </summary>
void Get(IChangeset changeset);
/// <summary>
/// Gets the files changed in the given changes.
/// </summary>
void Get(int changesetId, IEnumerable<IChange> change);
/// <summary>
/// Find path where the server item is mapped to in the
/// local workspace.
/// </summary>
string GetLocalItemForServerItem(string serverItem);
long CheckinTool(Func<string> generateCheckinComment);
void Merge(string sourceTfsPath, string tfsRepositoryPath);
/// <summary>
/// Gets the remote for which this workspace was created.
/// </summary>
IGitTfsRemote Remote { get; }
}
}