示例#1
0
文件: Git.cs 项目: typeset/typeset
 public static void Clone(string url, string path)
 {
     var command = new NGit.Api.CloneCommand();
     command.SetURI(url);
     command.SetDirectory(new Sharpen.FilePath(path));
     var result = command.Call();
 }
示例#2
0
        public static void Clone(string url, string path)
        {
            var command = new NGit.Api.CloneCommand();

            command.SetURI(url);
            command.SetDirectory(new Sharpen.FilePath(path));
            var result = command.Call();
        }
示例#3
0
        public void CanClone()
        {
            if(Directory.Exists(Path.Combine(ResourcesDir, "Clone")))
                Directory.Delete(Path.Combine(ResourcesDir, "Clone"),true);

            var cmd = new NGit.Api.CloneCommand();
            cmd.SetURI(Path.Combine(ResourcesDir, "RemoteRepo"));
            cmd.SetDirectory(Path.Combine(ResourcesDir, "Clone"));

            var git = cmd.Call();

            Assert.IsNotNull(git.GetRepository());
        }
示例#4
0
        public void CanClone()
        {
            if (Directory.Exists(Path.Combine(ResourcesDir, "Clone")))
            {
                Directory.Delete(Path.Combine(ResourcesDir, "Clone"), true);
            }

            var cmd = new NGit.Api.CloneCommand();

            cmd.SetURI(Path.Combine(ResourcesDir, "RemoteRepo"));
            cmd.SetDirectory(Path.Combine(ResourcesDir, "Clone"));

            var git = cmd.Call();

            Assert.IsNotNull(git.GetRepository());
        }
示例#5
0
文件: Git.cs 项目: ststeiger/NancyHub
 // Creates directory if not exists
 public virtual void Clone(string path, string url)
 {
     NGit.Api.CloneCommand clone      = NGit.Api.Git.CloneRepository().SetDirectory(path).SetURI(url);
     NGit.Api.Git          repository = clone.Call();
     CloseRepository(repository);
 } // End Sub Clone