コード例 #1
0
        public void DirectoryIsRepositoryReturnsFalseForNonExistingDir()
        {
            string dir    = DirectoryHelper.CreateTempDirectory(DirSuffix("non-existing"));
            string subDir = Path.Combine(dir, "sub");

            Assert.False(sut.DirectoryIsRepository(subDir));
        }
コード例 #2
0
        /// <summary>
        /// default implementation for backups if nothing special is needed
        /// </summary>
        protected void DefaultBackup(string cloneurl, string subdir, ScmCredentials credentials)
        {
            InitScm();
            scm.PullFromRemote(cloneurl, subdir, credentials);

            if (!scm.DirectoryIsRepository(subdir))
            {
                throw new InvalidOperationException(Resource.DirectoryNoRepo);
            }
        }