Clone a DAG, optionally skipping the commit.
763500
def clone(self, substitutions, commit=True, **kwargs):
        
        return self.store.clone(substitutions, **kwargs)
897742
def clone(cls, srcpath, destpath):
        """"""
        # Mercurial will not create intermediate directories for clones.
        try:
            os.makedirs(destpath)
        except OSError as e:
            if not e.errno == errno.EEXIST:
                raise
        cmd = [HG, 'clone', '--quiet', '--noupdate', srcpath, destpath]
        subprocess.check_call(cmd)
        return cls(destpath)
945118
public void cloneTo (@Nonnull final PDBusinessEntity ret)
  {
    ret.m_aNames.setAll (m_aNames);
    ret.m_sCountryCode = m_sCountryCode;
    ret.m_sGeoInfo = m_sGeoInfo;
    ret.m_aIDs.setAll (m_aIDs);
    ret.m_aWebsiteURIs.setAll (m_aWebsiteURIs);
    ret.m_aContacts.setAllMapped (m_aContacts, PDContact::getClone);
    ret.m_sAdditionalInfo = m_sAdditionalInfo;
    // Identifier are immutable
    ret.m_aRegistrationDate = m_aRegistrationDate;
  }
69967
def clone(self, *args, **kwargs):
        
        return self._client.clone_scope(*args, source_scope=self, **kwargs)
375718
def git_clone(uri, pull=True, reflect=False, cache_dir=None, chdir=True):
    '''
    
    '''
    cache_dir = cache_dir or CACHE_DIR
    # make the uri safe for filesystems
    repo_path = os.path.expanduser(os.path.join(cache_dir, safestr(uri)))
    if not os.path.exists(repo_path):
        from_cache = False
        logger.info(
            'Locally caching git repo [%s] to [%s]' % (uri, repo_path))
        cmd = 'git clone %s %s' % (uri, repo_path)
        sys_call(cmd)
    else:
        from_cache = True
        logger.info(
            'GIT repo loaded from local cache [%s])' % (repo_path))
    if pull and not from_cache:
        os.chdir(repo_path)
        cmd = 'git pull'
        sys_call(cmd, cwd=repo_path)
    if chdir:
        os.chdir(repo_path)
    if reflect:
        if not HAS_DULWICH:
            raise RuntimeError("`pip install dulwich` required!")
        return Repo(repo_path)
    else:
        return repo_path
274980
function cloneRepo() {
  return new Promise((resolve, reject) => {
    git.clone(`https://${GH_TOKEN}@github.com/dbtek/bootswatch-dist.git`, '.tmp/repo', (err, result) => {
      if (err) {
        return reject(err)
      }
      resolve(result)
    })
  })
}
618347
def clone_from_upstream(pkg_name, repo_url):
        """"""
        msg = "Spawning a cloning task for %s from upstream due to API req."
        LOG.info(msg % pkg_name)

        upstream_url = settings.UPSTREAM_BOWER_REGISTRY
        upstream_pkg = bowerlib.get_package(upstream_url, pkg_name)

        if upstream_pkg is None:
            raise Http404

        task = tasks.clone_repo.delay(pkg_name, upstream_pkg['url'])
        try:
            result = task.get(timeout=5)
        except tasks.TimeoutError:
            # Not done yet. What to return?
            raise ServiceUnavailable

        return result.to_package(repo_url)
1280196
def clone(src, **kwargs):
    """"""
    obj = object.__new__(type(src))
    obj.__dict__.update(src.__dict__)
    obj.__dict__.update(kwargs)
    return obj
551566
def clone_environment(self, clone, name=None, prefix=None, **kwargs):
        """"""
        cmd_list = ['create', '--json']

        if (name and prefix) or not (name or prefix):
            raise TypeError("conda clone_environment: exactly one of `name` "
                            "or `path` required")

        if name:
            cmd_list.extend(['--name', name])

        if prefix:
            cmd_list.extend(['--prefix', prefix])

        cmd_list.extend(['--clone', clone])

        cmd_list.extend(
            self._setup_install_commands_from_kwargs(
                kwargs,
                ('dry_run', 'unknown', 'use_index_cache', 'use_local',
                 'no_pin', 'force', 'all', 'channel', 'override_channels',
                 'no_default_packages')))

        return self._call_and_parse(cmd_list, abspath=kwargs.get('abspath',
                                                                 True))
60009
def SkipToken(obj, eng, callbacks, exc_info):
        """"""
        msg = "Skipped running this object: {0}".format(obj.id)
        eng.log.debug(msg)
        raise Continue
1184440
def _clone(self, shallowClone):
        """"""

        command = ['clone']
        switchToBranch = False
        if self.supportsBranch and self.branch != 'HEAD':
            if self.branch.startswith('refs/'):
                # we can't choose this branch from 'git clone' directly; we
                # must do so after the clone
                switchToBranch = True
                command += ['--no-checkout']
            else:
                command += ['--branch', self.branch]
        if shallowClone:
            command += ['--depth', str(int(shallowClone))]
        if self.reference:
            command += ['--reference', self.reference]
        if self.origin:
            command += ['--origin', self.origin]
        command += [self.repourl, '.']

        if self.prog:
            command.append('--progress')
        if self.retry:
            abandonOnFailure = (self.retry[1] <= 0)
        else:
            abandonOnFailure = True
        # If it's a shallow clone abort build step
        res = yield self._dovccmd(command, abandonOnFailure=(abandonOnFailure and shallowClone))

        if switchToBranch:
            res = yield self._fetch(None)

        done = self.stopped or res == RC_SUCCESS  # or shallow clone??
        if self.retry and not done:
            delay, repeats = self.retry
            if repeats > 0:
                log.msg("Checkout failed, trying %d more times after %d seconds"
                        % (repeats, delay))
                self.retry = (delay, repeats - 1)

                df = defer.Deferred()
                df.addCallback(lambda _: self._doClobber())
                df.addCallback(lambda _: self._clone(shallowClone))
                reactor.callLater(delay, df.callback, None)
                res = yield df

        return res
224168
def clone_and_update(self, **kwargs):
        
        cloned = self.clone()
        cloned.update(**kwargs)
        return cloned
885172
function clone(source, deep) {
    if (deep) {
        return lodash.cloneDeep(source);
    } else {
        return lodash.clone(source);
    }
}
756854
def git_clone_worker(queue):
    """"""
    while True:
        job = queue.get()
        if job is None:
            break
        git_url, path = job
        git_clone(git_url, path)
        queue.task_done()
1030381
def skip():
	""""""

	if not settings.platformCompatible():
		return False

	(output, error) = subprocess.Popen(["osascript", "-e", SKIP], stdout=subprocess.PIPE).communicate()
1045841
def skipPGVersionBefore(*ver):
    """"""

    ver = ver + (0,) * (3 - len(ver))

    def skip_before_postgres_(func):
        @wraps(func)
        def skip_before_postgres__(obj, *args, **kwargs):

            if hasattr(obj.conn, 'server_version'):
                server_version = obj.conn.server_version
            else:  # Assume Sqlalchemy
                server_version = obj.conn.connection.connection.server_version

            if server_version < int('%d%02d%02d' % ver):
                return obj.skipTest("Skipped because PostgreSQL {}".format(
                    server_version))
            else:
                return func(obj, *args, **kwargs)
        return skip_before_postgres__
    return skip_before_postgres_
788812
def clone(self, opts):
        '''
        
        '''
        topt = self.opts.copy()
        topt.update(opts)
        return self.__class__(self.modl, self.name, self.info, topt)