internal static void WriteQueuedBranches(IEnumerable <Branch> branches, string filePath)
        {
            if (branches == null)
            {
                return;
            }

            try
            {
                using (StreamWriter file = new StreamWriter(filePath))
                {
                    foreach (Branch branch in branches)
                    {
                        file.WriteLine(BranchParser.ToString(branch));
                    }
                }
            }
            catch (Exception ex)
            {
                LogException("Error writing the queued branches to '{0}': {1}", ex, filePath);
            }
        }
        internal static void EnqueueBranch(Branch branch, string filePath)
        {
            string line = string.Empty;

            try
            {
                line = BranchParser.ToString(branch);

                if (Directory.Exists(Path.GetDirectoryName(filePath)))
                {
                    Directory.CreateDirectory(Path.GetDirectoryName(filePath));
                }

                using (StreamWriter file = new StreamWriter(filePath, true))
                {
                    file.WriteLine(line);
                }
            }
            catch (Exception ex)
            {
                LogException("Error saving branch '{0}' to '{1}': {2}", ex, branch.FullName, filePath);
            }
        }