예제 #1
0
 public Revision(string[] attribs, string basePath)
 {
     revision = attribs[2];
     path     = Compress.getFileBasePathGIT(attribs[4], basePath);
     file     = Compress.getFileNameGIT(attribs[4]);
     size     = attribs[3];
 }
예제 #2
0
 public Revision(XmlNode node, string basePath)
 {
     revision = Compress.getFileRevisionSVN(node);
     path     = Compress.getFileBasePathSVN(node, basePath);
     file     = Compress.getFileName(node);
     size     = Compress.getFileSizeSVN(node);
 }
예제 #3
0
        static void Main(string[] args)
        {
            string path;

            if (0 == args.Length)
            {
                path = "config.txt";
            }
            else
            {
                path = args[0];
            }

            Console.WriteLine(@"start make revision.");
            using (StreamReader reader = new StreamReader(path))
            {
                string name  = reader.ReadLine();
                int    count = Convert.ToInt32(reader.ReadLine());
                using (Compress compress = new Compress())
                {
                    for (int i = 0; i < count; i++)
                    {
                        string   line  = reader.ReadLine();
                        string[] paths = line.Split(',');
                        string   data  = string.Empty;
                        if (paths[0] == "svn")
                        {
                            data = runSVN(paths[1]);
                            compress.parseStrSVN(data, paths.Length <= 2 ? "" : paths[2]);
                        }
                        else if (paths[0] == "git")
                        {
                            data = runGIT(paths[1]);
                            compress.parseStrGIT(data, paths.Length <= 2 ? "" : paths[2]);
                        }
                        else
                        {
                            Console.WriteLine("Wrong config format.");
                        }
                    }
                    compress.writeFile(name);
                }
                reader.Close();
            }

            Console.WriteLine(@"makeeeeee success.");
            Console.ReadKey(true);
        }
예제 #4
0
        static void Main(string[] args)
        {
            string path;
            if (0 == args.Length) path = "config.txt";
            else path = args[0];

            Console.WriteLine(@"start make revision.");
            using (StreamReader reader = new StreamReader(path))
            {
                string name = reader.ReadLine();
                int count = Convert.ToInt32(reader.ReadLine());
                using (Compress compress = new Compress())
                {
                    for (int i = 0; i < count; i++)
                    {
                        string line = reader.ReadLine();
                        string[] paths = line.Split(',');
                        string data = string.Empty;
                        if (paths[0] == "svn")
                        {
                            data = runSVN(paths[1]);
                            compress.parseStrSVN(data, paths.Length <= 2 ? "" : paths[2]);
                        }
                        else if (paths[0] == "git")
                        {
                            data = runGIT(paths[1]);
                            compress.parseStrGIT(data, paths.Length <= 2 ? "" : paths[2]);
                        }
                        else
                        {
                            Console.WriteLine("Wrong config format.");
                        }
                    }
                    compress.writeFile(name);
                }
                reader.Close();
            }

            Console.WriteLine(@"makeeeeee success.");
            Console.ReadKey(true);
        }
예제 #5
0
 public void appendSVN(XmlNode node)
 {
     file += "," + Compress.getFileName(node);
     size += "," + Compress.getFileSizeSVN(node);
 }