Returns the name of the repository, using the local directory name.

        :returns: str
348092
def _repo_name(self):
        

        if self._git_repo_name is not None:
            return self._git_repo_name
        else:
            reponame = self.repo.git_dir.split(os.sep)[-2]
            if reponame.strip() == '':
                return 'unknown_repo'
            return reponame
507558
protected String getRepositoryName(String repoName) throws RepositoryException
   {
      // To be cloud compliant we need now to ignore the provided repository name (more details in JCR-2138)
      ManageableRepository repo = repositoryService.getCurrentRepository();
      String currentRepositoryName = repo.getConfiguration().getName();
      if (PropertyManager.isDevelopping() && log.isWarnEnabled())
      {
         if (!currentRepositoryName.equals(repoName))
         {
            log.warn("The expected repository was '" + repoName
               + "' but we will use the current repository instead which is '" + currentRepositoryName + "'");
         }
      }
      return currentRepositoryName;
   }
950402
def installName(self):
        
        opts = {'name': self.name(), 'version': self.version()}
        if self.revision():
            opts['revision'] = '.{0}'.format(self.revision())
        else:
            opts['revision'] = ''

        if self._installName:
            return self._installName.format(**opts)
        else:
            return '{name}-{version}{revision}'.format(**opts)
945818
def cwd (self):
        
        path = self.urlparts[2].encode(self.filename_encoding, 'replace')
        dirname = path.strip('/')
        dirs = dirname.split('/')
        filename = dirs.pop()
        self.url_connection.cwd('/')
        for d in dirs:
            self.url_connection.cwd(d)
        return filename
1132819
def name(self):
        
        name = self._name.rstrip('/')
        if self._bytes_path:
            name = fsencode(name)
        return name
87840
def get_url(self):
        
        # construct the URL from runtime's FILESYSTEM location param
        # plus what we know about the location of repository / assetContents
        # have to get repositoryId from the asset?
        # return self._payload.get_url()
        url = '/repository/repositories/{0}/assets/{1}/contents/{2}/stream'.format(self._my_map['assignedRepositoryIds'][0],
                                                                                   str(self.get_asset_id()),
                                                                                   str(self.get_id()))

        if 'url_hostname' in self._config_map:
            url_hostname = self._config_map['url_hostname']
            return '{0}{1}'.format(url_hostname, url)

        return url
1055811
def get_url(self):
        
        cmd = {
            'hg': 'hg paths default',
            'git': 'git config --local --get remote.origin.url',
        }[self.vcs_type]
        with chdir(self.folder):
            r = self.run(cmd)
        return r.output.replace('\n', '')
538086
def get_path_to_repo(self, repo: str) -> Path:
        
        return Path(self.base_dir) / "repos" / self.repo_id(repo)
1241394
def get_snapshots_filename(impl, working_dir):
    
    snapshots_filename = impl.get_virtual_chain_name() + ".snapshots"
    return os.path.join(working_dir, snapshots_filename)
898820
def get_backend_name(self, location):
        
        for vc_type in self._registry.values():
            path = os.path.join(location, vc_type.dirname)
            if os.path.exists(path):
                return vc_type.name
        return None
981684
def path(self):
        
        return "/".join([
            part
            for part in [
                self.version,
                self.qualifier,
            ]
            if part
        ])
586152
def pathname(self):
        
        slug = self.name
        slug = unidecode.unidecode(slug)
        slug = slug.replace("-", "")
        slug = re.sub(r"[^\w\.]+", "-", slug).strip("-")
        return os.path.join(*slug.split("."))
9279
def _get_project_name(args):
    
    name = args.get(0)
    puts("")
    while not name:
        name = raw_input("What is the project's short directory name? (e.g. my_project) ")
    return name
722757
def basename(self):
        ''''''
        return os.path.basename(self.read_file)[:-len(self._get_extension(self.read_file))]
952889
def get_path_name(self):
        
        complete_path = os.path.dirname(os.path.abspath(self.path))
        name = self.path.replace(complete_path + PATH_SEPARATOR, "")
        if name.endswith("/"):
            name = name[: -1]

        return complete_path, name
722766
String getUIDFolderName() {
        if (uidFolderName == null) {
            String relPath = getAbsolutePath().replace(REPO_ABSOLUTE_PATH, "");
            relPath = relPath.substring(relPath.indexOf(SystemUtils.FILE_SEPARATOR) + 1);
            String[] parts = relPath.split("[\\\\/]");
            uidFolderName = StringUtils.isEmpty(parts[0]) ? "" : parts[0];
        }
        return uidFolderName;
    }
1051681
def name(self):
        
        if self._proto.id.namespace:
            return self._proto.id.namespace + '/' + self._proto.id.name
        return self._proto.id.name