Exemple #1
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();
 }
Exemple #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();
        }
Exemple #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());
        }
Exemple #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());
        }
Exemple #5
0
 // 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