// Mercurial-FIXME: use IProgressMonitor. protected override void OnCheckout(FilePath targetLocalPath, Revision rev, bool recurse, IProgressMonitor monitor) { var uri = new Uri (Url); var name = Path.GetFileName (uri.LocalPath); var path = Path.Combine (targetLocalPath, name); if (Directory.Exists (path) || File.Exists (path)) throw new InvalidOperationException (string.Format ("Cannot create directory '{0}' under {1}: file already exists", name, targetLocalPath)); Directory.CreateDirectory (path); var cmd = new CloneCommand (); if (rev != null) cmd.WithRevision (new RevSpec (((MercurialRevision) rev).ShortName)); RootRepository = new global::Mercurial.Repository (path); this.path = RootRepository.Path; RootRepository.Clone (Url, cmd); }
public MercurialRepository(FilePath path, string url) { this.path = path; Url = url; RootRepository = new global::Mercurial.Repository (path, new global::Mercurial.PersistentClientFactory ()); }
public override void CopyConfigurationFrom(Repository other) { base.CopyConfigurationFrom (other); MercurialRepository r = (MercurialRepository)other; path = r.path; if (r.RootRepository != null) RootRepository = new global::Mercurial.Repository (path); }
internal ShelfCollection(global::Mercurial.Repository repo) { this._repo = repo; }