Files
git-tfs/GitTfs/Commands/CheckinTool.cs
Philippe Miossec 22fc8f91c0 refacto: use 'int' to handle changeset Ids
instead of 'long' to match what is done in the tfs api
2015-11-16 01:11:44 +01:00

28 lines
980 B
C#

using System.ComponentModel;
using System.IO;
using Sep.Git.Tfs.Core;
using Sep.Git.Tfs.Util;
namespace Sep.Git.Tfs.Commands
{
[PluggableWithAliases("checkintool", "ct")]
[Description("checkintool [options] [ref-to-checkin]")]
[RequiresValidGitRepository]
public class CheckinTool : CheckinBase
{
public CheckinTool(TextWriter stdout, CheckinOptions checkinOptions, TfsWriter writer) : base(stdout, checkinOptions, writer)
{
}
protected override int DoCheckin(TfsChangesetInfo changeset, string refToCheckin)
{
if (!changeset.Remote.Tfs.CanShowCheckinDialog)
throw new GitTfsException(
"checkintool does not work with this TFS version (" + changeset.Remote.Tfs.TfsClientLibraryVersion + ").",
new[] {"Try installing the VS2010 edition of Team Explorer."});
return changeset.Remote.CheckinTool(refToCheckin, changeset);
}
}
}