def METHOD_NAME(self, ud, d):
    """Fetch url"""
    logger.debug2("Fetch: checking for module directory '" + ud.moddir + "'")
    lf = bb.utils.lockfile(ud.svnlock)
    try:
        if os.access(os.path.join(ud.moddir, '.svn'), os.R_OK):
            svncmd = self._buildsvncommand(ud, d, "update")
            logger.info("Update " + ud.url)
            # We need to attempt to run svn upgrade first in case its an older working format
            try:
                runfetchcmd(ud.basecmd + " upgrade", d, workdir=ud.moddir)
            except FetchError:
                pass
            logger.debug("Running %s", svncmd)
            bb.fetch2.check_network_access(d, svncmd, ud.url)
            runfetchcmd(svncmd, d, workdir=ud.moddir)
        else:
            svncmd = self._buildsvncommand(ud, d, "fetch")
            logger.info("Fetch " + ud.url)
            # check out sources there
            bb.utils.mkdirhier(ud.pkgdir)
            logger.debug("Running %s", svncmd)
            bb.fetch2.check_network_access(d, svncmd, ud.url)
            runfetchcmd(svncmd, d, workdir=ud.pkgdir)
        if not ("externals" in ud.parm and ud.parm["externals"] == "nowarn"):
            # Warn the user if this had externals (won't catch them all)
            output = runfetchcmd("svn propget svn:externals || true", d, workdir=ud.moddir)
            if output:
                if "--ignore-externals" in svncmd.split():
                    bb.warn("%s contains svn:externals." % ud.url)
                    bb.warn("These should be added to the recipe SRC_URI as necessary.")
                    bb.warn("svn fetch has ignored externals:\n%s" % output)
                    bb.warn("To disable this warning add ';externals=nowarn' to the url.")
                else:
                    bb.debug(1, "svn repository has externals:\n%s" % output)
        scmdata = ud.parm.get("scmdata", "")
        if scmdata == "keep":
            tar_flags = ""
        else:
            tar_flags = "--exclude='.svn'"
        # tar them up to a defined filename
        runfetchcmd("tar %s -czf %s %s" % (tar_flags, ud.localpath, ud.path_spec), d,
                    cleanup=[ud.localpath], workdir=ud.pkgdir)
    finally:
        bb.utils.unlockfile(lf)