Example #1
0
        /// <summary>
        /// Checks out the <paramref name="uri"/> to the <paramref name="workingCopyPath"/>.
        /// </summary>
        /// <param name="uri"></param>
        /// <param name="workingCopyPath"></param>
        public void CheckOut(string uri, string workingCopyPath, Revision revision)
        {
            SvnCommandOptions options = _defaultOptions.Clone();

            options.Revision = revision;
            options.Paths.Add(SvnPath.CreateSvnPath(uri));
            options.Paths.Add(SvnPath.CreateWCPath(workingCopyPath));
            _command.Run("checkout", options);
        }
Example #2
0
        /// <summary>
        /// Exports the <paramref name="depth"/> of the <paramref name="revision" /> of the <paramref name="uri"/> to the <paramref name="localPath"/>.
        /// </summary>
        /// <param name="uri">URI to export.</param>
        /// <param name="revision">Repository revision to export.</param>
        /// <param name="depth">Depth of the export.</param>
        /// <param name="localPath">Local path to which the files will be exported.</param>
        /// <param name="force">Whether or not to force overwrite existing files. Required if target directory exists, even if empty.</param>
        public void Export(string uri, Revision revision, DepthType depth, string localPath, bool force)
        {
            SvnCommandOptions options = _defaultOptions.Clone();

            options.Revision = revision;
            options.Depth    = depth;
            options.MiscArgs.Add(force ? "--force" : null);
            options.Paths.Add(SvnPath.CreateSvnPath(uri));
            options.Paths.Add(SvnPath.CreateWCPath(localPath));
            _command.Run("export", options);
        }