Issues

Issue #5413 duplicate

Allow accounts to have nested repository directory structure

Michael Cox
created an issue

The main two reasons I've switched from using GitHub to BitBucket are the more liberal private repository hosting policy and that I could created a nested repository directory structure (or so I thought). Unfortunately, the "slug" git repository name mapping implemented on BitBucket interferes with my attempts to use a nested repository directory structure.

First some background info.

The Boost C++ libraries project is currently experimenting with converting their Subversion repository to a set of git repositories: a git repository named boost.git acting as a super-project and separate submodule git repositories for each C++ library and tool in Boost. The experimental Boost C++ libraries are hosted under github.com/boost-lib. I currently have a local LAN server that has mirror cloned repositories of the official boost-lib repositories on github.com/boost-lib, pulling down the changes as desired. These mirror cloned repositories are under ~scm/git/oss/tool/boost-lib on the LAN server and are identical to the github.com/boost-lib repositories. I then again mirror cloned the ~scm/git/oss/tool/boost-lib repositories to reside under ~scm/git/bluezoo/tool/boost-lib, which are shared by my individual local projects . These ~scm/git/bluezoo/tool/boost-lib mirror cloned repositories are identical to the github.com/boost-lib repositories except they contain a bluezoo/master branch that is identical to the original master branch except for modifications to the .gitmodules file (see attachment). I modify the .gitmodules file to use a relative path instead of an absolute path to the github.com/boost-lib submodule repositories, e.g. all the url properties in the .gitmodules files are changed from the absolute http://github.com/boost-lib/foo.git to the relative ../foo.git. This allows me to do a --recurse-submodules push to the LAN server repositories from my local project repositories and a --recurse-submodules pull from the LAN server repositories to my local project repositories. I'd like to be able to push my LAN server repositories with their nested repository submodule structure to BitBucket, but because of the "slug" mapping my mhcox/bluezoo/tool/boost-lib/boost.git repository is mapped to bluezoo-tool-boost-lib-boost.git.

So can the "slug" mapping algorithm be modified to allow nested repository directory structures?

Comments (4)

  1. Jesper Nøhr

    Michael,

    We'd like to help, but allowing / in slug names is not possible for us. Too many things would be ambigious--take for example 'boost/src/', does that refer to the sub-repository named "src" under the "boost" repository, or does it refer to the source page?

    I'm open to suggestions here. Maybe I'm missing the point entirely.

  2. Michael Cox reporter

    I'm not suggesting directories inside the git repository are visible, just that you can organize your git repositories in a hierarchy instead of being forced to have a flat, one-dimensional structure. That way a user can organize repositories from unrelated sources without having to worry about clashing repository names. Using git's submodule functionality allows the user to arbitrarily combine the repositories using a super-project repository into whatever structure their super-project requires. With relative submodule URLs the git submodule becomes relocatable.

  3. Log in to comment