示例#1
0
        public void TestArchive()
        {
            string path        = GetTemporaryPath();
            string archivePath = GetTemporaryPath();
            string file        = Path.Combine(path, "foo");

            CommandClient.Initialize(path, MercurialPath);
            using (var client = new CommandClient(path, null, null, MercurialPath)) {
                File.WriteAllText(file, string.Empty);
                client.Add(file);
                client.Commit(file);
                client.Archive(archivePath);
                Assert.That(Directory.Exists(archivePath));
                Assert.That(!Directory.Exists(Path.Combine(archivePath, ".hg")));
                Assert.That(File.Exists(Path.Combine(archivePath, "foo")));
            }
        }