performs the clone command
433923
function performCmd(repoURL, path){

      var deferred = Q.defer();

      if(errorOccured === true){
        deferred.reject();
        return deferred.promise;
      }

      if(grunt.file.isDir(path) && options.overWrite === false){
        deferred.resolve(false);
        return deferred.promise;
      }

      var msg = '---> Cloning "'+repoURL+'" ==> '+path;
      var execString = 'git clone '+repoURL+' '+path;

      if(options.depth > 0){
        execString += ' --depth '+options.depth;
      }

      if(options.postClone !== ''){
        msg += ' THEN executing "'+options.postClone+'"';
        execString += ' && cd '+path+' && '+options.postClone;
      }

      grunt.log.writeln(msg);

      var child = exec(execString);

      // add events for logging
      child.stdout.on('data', function(data) {
        grunt.log.writeln(data);
      });
      child.stderr.on('data', function(data) {
        grunt.verbose.writeln(data);
      });
      child.on('close', function(code) {
        deferred.resolve(true);
      });

      return deferred.promise;

    }
704678
def clone(self, repo, ref, deps=()):
        """"""

        if os.path.isdir(repo):
            repo = os.path.abspath(repo)

        def clone_strategy(directory):
            env = git.no_git_env()

            def _git_cmd(*args):
                cmd_output('git', *args, cwd=directory, env=env)

            _git_cmd('init', '.')
            _git_cmd('remote', 'add', 'origin', repo)

            try:
                self._shallow_clone(ref, _git_cmd)
            except CalledProcessError:
                self._complete_clone(ref, _git_cmd)

        return self._new_repo(repo, ref, deps, clone_strategy)
311956
def project_clone(object_id, input_params={}, always_retry=False, **kwargs):
    
    return DXHTTPRequest('/%s/clone' % object_id, input_params, always_retry=always_retry, **kwargs)
1156372
function clone(a) {
  return a === undefined ? undefined : JSON.parse(JSON.stringify(a))
}
1081454
def set_up_clone(self, repo_name, remote_repo):
        """"""
        dirname = self.clone_dir(repo_name)
        self.to_cleanup[repo_name] = dirname
        klass = self.get_repo_class()
        repo = klass(repo_name,
                     dirname,
                     self.tools,
                     self.executor,
                     shallow=self.shallow_clone)
        return (dirname, repo)
994118
def clone(self, newname, config_path=None, flags=0, bdevtype=None,
              bdevdata=None, newsize=0, hookargs=()):
        

        args = {}
        args['newname'] = newname
        args['flags'] = flags
        args['newsize'] = newsize
        args['hookargs'] = hookargs
        if config_path:
            args['config_path'] = config_path
        if bdevtype:
            args['bdevtype'] = bdevtype
        if bdevdata:
            args['bdevdata'] = bdevdata

        if _lxc.Container.clone(self, **args):
            return Container(newname, config_path=config_path)
        else:
            return False
964750
def clone(self, d):
        
        return Desinence(d.grq(), d.morphoNum(), d.numRad(), self)
257247
def git_clone(git_url, path):
    """"""
    if os.path.exists(os.path.join(path, '.git')):
        # get rid of local repo if it already exists
        shutil.rmtree(path)

    os.makedirs(path, exist_ok=True)
    print('Start cloning from {}…'.format(git_url))
    git_proc = subprocess.Popen(['git', 'clone', git_url, path],
                                stderr=subprocess.PIPE,
                                stdout=subprocess.PIPE,
                                env={'GIT_TERMINAL_PROMPT': '0'})

    try:
        stdoutmsg, stderrmsg = git_proc.communicate(timeout=120)
    except subprocess.TimeoutExpired:
        git_proc.kill()
        stderrmsg = b'Timed out.'

    if git_proc.returncode == 0:
        print('Cloned {}.'.format(git_url))
    else:
        print('Error cloning from {}:\n{}'.format(git_url,
                                                  stderrmsg.decode('utf-8')))
69967
def clone(self, *args, **kwargs):
        
        return self._client.clone_scope(*args, source_scope=self, **kwargs)
229109
def clone(self, **override_vars):
        """"""
        c = Context(self.vars, self.data)
        c.executed_actions = set(self.executed_actions)
        c.vars.update(override_vars)
        return c
805814
def clone(self):
        ''' 
        '''
        clone = copy(self)
        clone.variables = {k: v.clone() for (k, v) in self.variables.items()}
        return clone
68642
def clone(self):
        
        obj = self.__class__()
        obj.libs = deepcopy(self.libs)
        return obj
117092
def clone(self) -> "Event":
        
        return self.__class__(copy.deepcopy(self.event), copy.deepcopy(self.metadata))
831499
def clone(self, spawn_mapping=None):
        
        c = self.spawn(spawn_mapping)
        self.register_clone(c)
        c.register_parent(self)
        return c
794142
def _clone(self, deepcopy=True, base=None):
        """"""
        if not base:
            if self.__explicit_session:
                base = self._clone_base(self.__session)
            else:
                base = self._clone_base(None)

        values_to_clone = ("spec", "projection", "skip", "limit",
                           "max_time_ms", "max_await_time_ms", "comment",
                           "max", "min", "ordering", "explain", "hint",
                           "batch_size", "max_scan", "manipulate",
                           "query_flags", "modifiers", "collation")
        data = dict((k, v) for k, v in iteritems(self.__dict__)
                    if k.startswith('_Cursor__') and k[9:] in values_to_clone)
        if deepcopy:
            data = self._deepcopy(data)
        base.__dict__.update(data)
        return base
94608
def clonerepo(barerepo, userrepo):
    

    git.clone(barerepo, userrepo)
    ag = activegit.ActiveGit(userrepo)
697240
def clone(self, id=None, src=None, backup=None, size=None):
        
        # Set basic Logging
        logging.basicConfig()
        # Get the lunr logger
        log = logger.get_logger()
        # Output Debug level info
        log.logger.setLevel(logging.DEBUG)
        # Load the local storage configuration
        conf = LunrConfig.from_storage_conf()
        # Init the volume helper
        volume = VolumeHelper(conf)

        # Attempt to figure out the original volume size
        size = size or str(volume.get(src)['size'] / 1073741824)
        # Size is in gigs
        if not re.match('G', size):
            size = size + 'G'
        # Create a tag to apply to the lvm volume
        tag = encode_tag(source_volume_id=src, backup_id=backup)
        # Create the volume
        execute('lvcreate', volume.volume_group,
                name=id, size=size, addtag=tag)
        # Get info for the newly created volume
        new = volume.get(id)

        with self.timeit():
            print("Starting Backup")
            # Restore volume from the backup
            volume.clone(new, src, backup)