Exemplo n.º 1
0
        protected override void ParseArgs(string[] args)
        {
            var parsedArgs = ArgumentParser.ParseUpdate(args);

            treeish = (string)parsedArgs["treeish"];
            verbose = (bool)parsedArgs["verbose"];
            policy  = PolicyMapper.GetLocalChangesPolicy(parsedArgs);
        }
Exemplo n.º 2
0
        public void Get(string module, string treeish = null, LocalChangesPolicy localChangesPolicy = LocalChangesPolicy.FailOnLocalChanges)
        {
            var getter = new ModuleGetter(
                GetModules().ToList(),
                new Dep(module, treeish),
                localChangesPolicy,
                null);

            getter.GetModule();
            getter.GetDeps();
        }
Exemplo n.º 3
0
 public ModuleGetter(List <Module> modules, Dep rootModule,
                     LocalChangesPolicy userLocalChangesPolicy,
                     string mergedBranch, bool verbose = false, bool localBranchForce = false)
 {
     this.modules                = modules;
     this.rootModule             = rootModule;
     this.userLocalChangesPolicy = userLocalChangesPolicy;
     this.localBranchForce       = localBranchForce;
     this.verbose                = verbose;
     this.mergedBranch           = mergedBranch;
 }
Exemplo n.º 4
0
        protected override void ParseArgs(string[] args)
        {
            Helper.RemoveOldKey(ref args, "-n", Log);

            var parsedArgs = ArgumentParser.ParseUpdateDeps(args);

            configuration    = (string)parsedArgs["configuration"];
            mergedBranch     = (string)parsedArgs["merged"];
            localBranchForce = (bool)parsedArgs["localBranchForce"];
            verbose          = (bool)parsedArgs["verbose"];
            policy           = PolicyMapper.GetLocalChangesPolicy(parsedArgs);
        }
Exemplo n.º 5
0
 public ModuleGetter(List <Module> modules, Dep rootModule,
                     LocalChangesPolicy userLocalChangesPolicy,
                     string mergedBranch, bool verbose = false, bool localBranchForce = false, int?gitDepth = null)
 {
     this.modules                = modules;
     this.rootModule             = rootModule;
     this.userLocalChangesPolicy = userLocalChangesPolicy;
     this.localBranchForce       = localBranchForce;
     this.gitDepth               = gitDepth;
     this.verbose                = verbose;
     this.mergedBranch           = mergedBranch;
     cycleDetector               = new CycleDetector();
 }
Exemplo n.º 6
0
        protected override void ParseArgs(string[] args)
        {
            Helper.RemoveOldKey(ref args, "-n", Log);

            var parsedArgs = ArgumentParser.ParseGet(args);

            module = (string)parsedArgs["module"];
            if (string.IsNullOrEmpty(module))
            {
                throw new CementException("You should specify the name of the module");
            }

            treeish       = (string)parsedArgs["treeish"];
            configuration = (string)parsedArgs["configuration"];
            mergedBranch  = (string)parsedArgs["merged"];
            verbose       = (bool)parsedArgs["verbose"];
            policy        = PolicyMapper.GetLocalChangesPolicy(parsedArgs);
        }