本文整理汇总了C#中MonoDevelop.VersionControl.Repository类的典型用法代码示例。如果您正苦于以下问题:C# Repository类的具体用法?C# Repository怎么用?C# Repository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Repository类属于MonoDevelop.VersionControl命名空间,在下文中一共展示了Repository类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Revision
protected Revision (Repository repo, DateTime time, string author, string message)
{
this.repo = repo;
this.Time = time;
this.Author = author;
this.Message = message;
}
示例2: VersionControlItem
public VersionControlItem (Repository repository, IWorkspaceObject workspaceObject, FilePath path, bool isDirectory)
{
this.path = path;
this.repository = repository;
this.workspaceObject = workspaceObject;
this.isDirectory = isDirectory;
}
示例3: RevertRevisions
private static bool RevertRevisions (Repository vc, string path, Revision revision, bool test, bool toRevision)
{
try {
if (test) {
return (vc.CanRevert (path));
}
string question = GettextCatalog.GetString (
"Are you sure you want to revert the selected resources to the revision specified (all local changes will be discarded)?");
if (!toRevision)
question = GettextCatalog.GetString (
"Are you sure you want to revert the changes from the revision selected on these resources?");
if (MessageService.AskQuestion (question,
GettextCatalog.GetString ("Note: The reversion will occur in your working copy, so you will still need to perform a commit to complete it."),
AlertButton.Cancel, AlertButton.Revert) != AlertButton.Revert)
return false;
new RevertWorker(vc, path, revision, toRevision).Start();
return true;
}
catch (Exception ex) {
if (test)
LoggingService.LogError (ex.ToString ());
else
MessageService.ShowException (ex, GettextCatalog.GetString ("Version control command failed."));
return false;
}
}
示例4: Commit
public static void Commit (Repository vc, ChangeSet changeSet)
{
try {
if (vc.GetVersionInfo (changeSet.BaseLocalPath).CanCommit) {
if (!VersionControlService.NotifyPrepareCommit (vc, changeSet))
return;
CommitDialog dlg = new CommitDialog (changeSet);
try {
if (MessageService.RunCustomDialog (dlg) == (int) Gtk.ResponseType.Ok) {
if (VersionControlService.NotifyBeforeCommit (vc, changeSet)) {
new CommitWorker (vc, changeSet, dlg).Start();
return;
}
}
dlg.EndCommit (false);
} finally {
dlg.Destroy ();
}
VersionControlService.NotifyAfterCommit (vc, changeSet, false);
}
}
catch (Exception ex) {
MessageService.ShowException (ex, GettextCatalog.GetString ("Version control command failed."));
}
}
示例5: CommitWorker
public CommitWorker (Repository vc, ChangeSet changeSet, CommitDialog dlg)
{
this.vc = vc;
this.changeSet = changeSet;
this.dlg = dlg;
OperationType = VersionControlOperationType.Push;
}
示例6: ModifyPath
protected override void ModifyPath (Repository repo, ref FilePath old)
{
var repo2 = (GitRepository)repo;
old = repo2.RootRepository.Info.WorkingDirectory;
repo2.RootRepository.Config.Set<string> ("user.name", Author);
repo2.RootRepository.Config.Set<string> ("user.email", Email);
}
示例7: VersionControlItem
public VersionControlItem (Repository repository, IWorkspaceObject workspaceObject, FilePath path, bool isDirectory, VersionInfo versionInfo)
{
Path = path;
Repository = repository;
WorkspaceObject = workspaceObject;
IsDirectory = isDirectory;
this.versionInfo = versionInfo;
}
示例8: CanPublish
public static bool CanPublish (Repository vc, string path, bool isDir) {
if (!VersionControlService.CheckVersionControlInstalled ())
return false;
if (!vc.GetVersionInfo (path).IsVersioned && isDir)
return true;
return false;
}
示例9: CopyConfigurationFrom
public override void CopyConfigurationFrom (Repository other)
{
base.CopyConfigurationFrom (other);
UrlBasedRepository ot = (UrlBasedRepository) other;
url = ot.url;
CreateUri ();
}
示例10: Revision
protected Revision (Repository repo, DateTime time, string author, string message, RevisionPath[] changedFiles)
{
this.repo = repo;
this.time = time;
this.author = author;
this.message = message;
this.changedFiles = changedFiles;
}
示例11: PublishWorker
public PublishWorker (Repository vc, string moduleName, FilePath localPath, FilePath[] files, string message)
{
this.vc = vc;
this.path = localPath;
this.moduleName = moduleName;
this.files = files;
this.message = message;
}
示例12: PublishWorker
public PublishWorker (Repository vc, string moduleName, FilePath localPath, FilePath[] files, string message)
{
this.vc = vc;
this.path = localPath;
this.moduleName = moduleName;
this.files = files;
this.message = message;
OperationType = VersionControlOperationType.Push;
}
示例13: ChangeSet
internal protected ChangeSet (Repository repo, FilePath basePath)
{
this.repo = repo;
//make sure the base path has a trailign slash, or ChangeLogWriter's
//GetDirectoryName call on it will take us up a directory
string bp = basePath.ToString ();
if (bp[bp.Length -1] != System.IO.Path.DirectorySeparatorChar)
basePath = bp + System.IO.Path.DirectorySeparatorChar;
this.basePath = basePath;
}
示例14: ChangeSet
internal protected ChangeSet (Repository repo, FilePath basePath)
{
this.repo = repo;
// Make sure the path has a trailing slash or the ChangeLogWriter's
// call to GetDirectoryName will take us one extra directory up.
string bp = basePath.ToString ();
if (bp [bp.Length - 1] != System.IO.Path.DirectorySeparatorChar)
basePath = bp + System.IO.Path.DirectorySeparatorChar;
this.basePath = basePath;
}
示例15: CopyConfigurationFrom
public override void CopyConfigurationFrom (Repository other)
{
base.CopyConfigurationFrom (other);
UrlBasedRepository ot = (UrlBasedRepository) other;
dir = ot.dir;
user = ot.user;
pass = ot.pass;
port = ot.port;
server = ot.server;
method = ot.method;
}