using scmmanager with existing tree of repositories

1,808 views
Skip to first unread message

Eric

unread,
Oct 10, 2011, 11:29:08 AM10/10/11
to scmmanager

Hi,
I'm trying out scmmanager (1.7, standalone) to see if it'll work for
what I need and I'm having some problems. I have an existing tree of
repositories that I want to access through it. I have managed to get
scmmanager up and running, and I can create some new test
repositories, but when I change the repository directory to where my
repositories are nothing shows up, even if I restart.

Also, I can't seem to create repositories in subdirectories. If I try
to create one with a name like "foo/test1" it just highlights the
field in red and the Ok button is disabled. Is this supposed to work
or is scmmanager limited to just a simple flat set of repositories?

eric

Sebastian Sdorra

unread,
Oct 11, 2011, 2:32:23 AM10/11/11
to scmma...@googlegroups.com
Hi eric,
Import of existing repositories is not supported at the moment, but we
are working on it
(https://bitbucket.org/sdorra/scm-manager/issue/59/import-existing-repositories).
You have to import your repositories manually:
- Point your repository directories to empty directories on your harddisk
- Create a new repository with scm-manager
- Import the existing data:
- Git: go to your working copy and push the content to your new
repository (git push --all http://localhost:8080/scm/git/yourrepo)
- Mercurial: go to your working copy and push the content to your
new repository (hg push http://localhost:8080/scm/hg/yourrepo)
- Subversion: Have a look at
https://groups.google.com/forum/#!topic/scmmanager/BJc9HtiIXtU

SCM-Manager has no support for subrepositories at the moment
(https://bitbucket.org/sdorra/scm-manager/issue/47/support-for-directory-structure).

Sebastian

2011/10/10 Eric <haw...@gmail.com>:

David M. Carr

unread,
Oct 11, 2011, 7:48:58 AM10/11/11
to scmma...@googlegroups.com
I haven't found any Mercurial repository hosting solution that cleanly
supports all reasonable subrepo configurations yet (without
workarounds). The best potential workaround I've thought of is (note,
I haven't yet tested this approach):
1) Individually create repos on SCM Manager for each of the subrepos used
2) Create an empty repo on SCM Manager for the parent repo
3) Using direct access to the machine SCM Manager is running on (since
SCM Manager doesn't currently provide a way to edit Mercurial config
files via the web interface), configure a subpaths file that maps each
subrepo to the correct URL in SCM Manager, and possibly the projrc
extension as well (so that this config can be pulled later on). (It
might be necessary to manually copy these configs to your local
machine as well for the next step to work)
4) Push your existing parent repository to SCM Manager. It should use
the subpath definitions to push the subrepos to the correct URLs in
SCM Manager.

I'd be very interested in how it goes if you try out this approach,
either positive or negative.

http://mercurial.selenic.com/wiki/SubrepoRemappingPlan

David M. Carr
da...@carrclan.us

Eric

unread,
Oct 11, 2011, 11:45:31 AM10/11/11
to scmmanager
On Oct 11, 6:48 am, "David M. Carr" <da...@carrclan.us> wrote:
> I haven't found any Mercurial repository hosting solution that cleanly
> supports all reasonable subrepo configurations yet (without
> workarounds).  The best potential workaround I've thought of is (note,
> I haven't yet tested this approach):

No, I think you misunderstood me. I don't need or want subrepos; that
makes things more complicated than is necessary.

I just want to *organize* my independent repositories. There are many
different projects that people at my company are working on, and each
of the projects has multiple repositories. All of the repositories
for any particular project are placed in a subdirectory.

This works fine with hgweb, so when I go to https://myserver/hg/foo/ I
see the repos for project foo, and under https://myserver/hg/bar/ I
see the repos for project bar, etc... Unfortunately it seems like
every repository manager that I've looked at completely ignores the
idea of organizing your repositories. :(

eric

Eric

unread,
Oct 11, 2011, 11:56:50 AM10/11/11
to scmmanager
On Oct 11, 1:32 am, Sebastian Sdorra <s.sdo...@gmail.com> wrote:
> Hi eric,
> Import of existing repositories is not supported at the moment, but we
> are working on it
> (https://bitbucket.org/sdorra/scm-manager/issue/59/import-existing-rep...).

That issue talks about things like creating a UI so the repositories
can be imported. Why not just have them automatically show up? Why
does there need to be a manual import step?
I'm thinking of how hgweb works, where if a new repository is created
it just shows up the next time the page is refreshed.

> You have to import your repositories manually:
> - Point your repository directories to empty directories on your harddisk
> - Create a new repository with scm-manager
> - Import the existing data:
>   - Git: go to your working copy and push the content to your new
> repository (git push --allhttp://localhost:8080/scm/git/yourrepo)
>   - Mercurial: go to your working copy and push the content to your
> new repository (hg pushhttp://localhost:8080/scm/hg/yourrepo)

Well, sure, that gets any changesets, but that's not going to get the
settings from the .hg/hgrc file, which is really the important piece.
We have lots of repositories with custom descriptions, contact
information and hooks for each one that are critical to how we use the
repositories. Thanks for the workaround though.

eric

Sebastian Sdorra

unread,
Oct 11, 2011, 1:42:12 PM10/11/11
to scmma...@googlegroups.com
SCM-Manager does not really use the hgrc files, it stores it's own
repository type independent information's and permissions in the
repository.xml. This is why we have to import existing repositories.
The hgweb view is a mercurial thing and it is something like a bonus
for mercurial repositories in scm-manager. Perhaps we could implement
something like group views in the repository overview to organize
repository structures, but we could not use the hgweb view for
repository grouping.

Sebastian

2011/10/11 Eric <haw...@gmail.com>:

David M. Carr

unread,
Oct 11, 2011, 3:26:48 PM10/11/11
to scmma...@googlegroups.com
Ah, you're correct, I completely misunderstood. It sounds like maybe
what you're interested in is something like a repository "grouping"
feature, where you can establish a named group/project and create
repositories within that namespace.

David M. Carr
da...@carrclan.us

Robert Ros

unread,
Oct 17, 2011, 7:11:44 AM10/17/11
to scmma...@googlegroups.com
On Tue, Oct 11, 2011 at 9:26 PM, David M. Carr <da...@carrclan.us> wrote:
> Ah, you're correct, I completely misunderstood.  It sounds like maybe
> what you're interested in is something like a repository "grouping"
> feature, where you can establish a named group/project and create
> repositories within that namespace.

I recently submitted a feature request for similar functionality. We
don't use named branches, but for each supported version we keep a
clone. Normally we "group" these repositories in a project directory,
see: https://bitbucket.org/sdorra/scm-manager/issue/47/support-for-directory-structure
for the detailed description.

Importing an existing collection of repositories is a whole different
problem. I ended up writing some scripts to copy the repositories and
to generate a the repositories.xml file.

rros

Reply all
Reply to author
Forward
0 new messages