Store Mercurial files in bare repository, SCM-Manager 2.x ? Mirror hg on commit ?

52 views
Skip to first unread message

5usc2...@liamekaens.com

unread,
Jun 16, 2021, 12:57:37 AM6/16/21
to scmma...@googlegroups.com
Hi SCM-Manager mailing list,

First, I have just set up SCM-Manager 2.x to use with Mercurial on Debian, I like the GUI overall* and setting it up was VERY painless so thanks so VERY much for that!

I've successfully created a few test Hg repositories using the web GUI and have some questions.

1) Is it possible to get SCM-Manager to store files on disk in a bare Mercurial compatible format? I believe SCM-Manager 1.x did this. I have other tools (like Redmine) that need access to "bare" Hg repositories.

Looking in /var/lib/scm/repository the files seem to be in a non-Mercurial data format. I assume this is so SCM-Manager can be version control system agnostic? If this is the case, is this documented some place? I looked but couldn't find antyhing other than it doesn't need a dedicated database (which is a very nice benefit).

2) If the on-disk format can't be changed, is it possible to use the scripting plug-in to automatically invoke an 'hg pull' command on any commits, so I can mirror SCM's repository to another location (which these other tools can access)?

I did look into the Plugin-Script (https://scm-manager.org/plugins/scm-script-plugin/docs/2.2.x/en/samples/) and did see the samples but didn't find any documentation on the internal SCM2 APIs and/or some more examples on using it other than the Groovy syntax. For example, how might my script hook SCM's commit mechanism?

----- GUI feedback / questions -----

3) Although it's against current UI conventions, it would be nice if the icons had labels on them (or if such a theme existed). If you work between enough tools they all have their own GUI and memorizing icons becomes overwhelming. A bonus would be if these icons actually had color as well.

4) It would be nice to see or have a committ tree / DAG view rather than just the list view, like this : https://kallithea-scm.org/images/graph.png .

Thank you SCM-Manager for a quality piece of software and having a forum where users can interact with you.

Eduard Heimbuch

unread,
Jun 16, 2021, 5:32:40 AM6/16/21
to scmmanager
Hey,

thanks for all the support and also the helpful feedback! This really motivates us to keep up the good work!

1) The mercurial repositories in SCM-Manager should be plain mercurial bare repositories. Did you check the repo folder? The path could look like this: "${your_scm_home_dir}/repositories/${your_hg_repo_id}/data/.hg". Your ".hg" directory could be hidden.

2) Depends what you exactly want to do. You could use the SCM-Webhook-plugin (https://scm-manager.org/plugins/scm-webhook-plugin/docs/2.2.x/en/configuration/) or the SCM-Script-Plugin (https://scm-manager.org/plugins/scm-script-plugin/docs/2.2.x/en/run/) to trigger something after each push (or for each commit). If you want a mirror of an external repository into you SCM-Manager you could also check out the SCM-Repository-Mirror-Plugin (https://scm-manager.org/plugins/scm-repository-mirror-plugin/docs/1.0.x/en/create/).

3+4) Again thanks for your feedback. I already addressed your suggestions to our UX designer and we will discuss this internally.

Best regards,
Eduard Heimbuch

Eduard Heimbuch

unread,
Jun 16, 2021, 5:35:32 AM6/16/21
to scmmanager
My bad... Regarding the SCM-Repository-Mirror-Plugin we do not support mirrors of hg repositories for now. 

5usc2...@liamekaens.com

unread,
Jun 17, 2021, 12:13:04 PM6/17/21
to scmma...@googlegroups.com

Hi Eduard,

Thanks for the quick response!

On 2021-06-16 02:32, Eduard Heimbuch eduard.heimbuch-at-cloudogu.com  wrote:

Hey,
 
thanks for all the support and also the helpful feedback! This really motivates us to keep up the good work!
 
1) The mercurial repositories in SCM-Manager should be plain mercurial bare repositories. Did you check the repo folder? The path could look like this: "${your_scm_home_dir}/repositories/${your_hg_repo_id}/data/.hg". Your ".hg" directory could be hidden.
 
I'm embarrased to say I missed this!  I tried hg serve from the /data folder and it worked fine so confirming no issues there.  I used tree but accidentally skipped listing hidden folders, apologies!  
 
- I'd like to make a feature request which I can file via GitHub if that's more appropriate.  Request:  Option to have repository on disk named the same as what is entered via GUI.
 
When I created a repository named 'TEST_REPO'  I found it on disk as /var/lib/scm/repository/3HSaNrqIH9 .  I renamed the repository by hand to 'TEST_REPO' and modified /var/lib/scm/config/repository-paths.xml and changing 2nd part of the key value pair with the repo_id like this  <repository id="3HSaNrqIH9">repositories/TEST_REPO</repository> and things seem to work.  So it seems SCM-Manager could potentially do this for users automatically if the option existed in the GUI.
 
 
2) Depends what you exactly want to do. You could use the SCM-Webhook-plugin (https://scm-manager.org/plugins/scm-webhook-plugin/docs/2.2.x/en/configuration/) or the SCM-Script-Plugin (https://scm-manager.org/plugins/scm-script-plugin/docs/2.2.x/en/run/) to trigger something after each push (or for each commit). If you want a mirror of an external repository into you SCM-Manager you could also check out the SCM-Repository-Mirror-Plugin (https://scm-manager.org/plugins/scm-repository-mirror-plugin/docs/1.0.x/en/create/).
 
- I think it would be great if the SCM Manager website showcased some good examples and documentation on how to use the Webhook or Script-Plugins beyond what's currently there.  I believe the functionality is powerful but not knowing the API's of SCM or where to find them I'm not sure how I might perform operations on every commit (for example getting a Continous Integration system to kick off a task).
 
3+4) Again thanks for your feedback. I already addressed your suggestions to our UX designer and we will discuss this internally.
 

One other minor GUI feedback -- it would be nice to have some knobs to control what shows up on the 'Activities' plug-in.

I have the 'Activities' plug-in installed but have disabled checking for plug-in updates since that slows login times.  As a resut the Activities history is populated with lots of 'Couldn't get plug-in status'.

Thank you again!

Eduard Heimbuch

unread,
Jun 21, 2021, 2:11:36 AM6/21/21
to scmma...@googlegroups.com
Am Do., 17. Juni 2021 um 18:13 Uhr schrieb <5usc2...@liamekaens.com>:

Hi Eduard,

Thanks for the quick response!

On 2021-06-16 02:32, Eduard Heimbuch eduard.heimbuch-at-cloudogu.com  wrote:

Hey,
 
thanks for all the support and also the helpful feedback! This really motivates us to keep up the good work!
 
1) The mercurial repositories in SCM-Manager should be plain mercurial bare repositories. Did you check the repo folder? The path could look like this: "${your_scm_home_dir}/repositories/${your_hg_repo_id}/data/.hg". Your ".hg" directory could be hidden.
 
I'm embarrased to say I missed this!  I tried hg serve from the /data folder and it worked fine so confirming no issues there.  I used tree but accidentally skipped listing hidden folders, apologies!  
 
- I'd like to make a feature request which I can file via GitHub if that's more appropriate.  Request:  Option to have repository on disk named the same as what is entered via GUI.
 
When I created a repository named 'TEST_REPO'  I found it on disk as /var/lib/scm/repository/3HSaNrqIH9 .  I renamed the repository by hand to 'TEST_REPO' and modified /var/lib/scm/config/repository-paths.xml and changing 2nd part of the key value pair with the repo_id like this  <repository id="3HSaNrqIH9">repositories/TEST_REPO</repository> and things seem to work.  So it seems SCM-Manager could potentially do this for users automatically if the option existed in the GUI.

I see your point, but your requested change would break many of our internal apis. The internal data stores we use depend on the repository id. If the id would be changed like in your request, it will be really hard to find out where the data belong. 

We had your proposed concept in SCM-Manager V1 and therefore could not implement a "rename" function.
 
 
 
2) Depends what you exactly want to do. You could use the SCM-Webhook-plugin (https://scm-manager.org/plugins/scm-webhook-plugin/docs/2.2.x/en/configuration/) or the SCM-Script-Plugin (https://scm-manager.org/plugins/scm-script-plugin/docs/2.2.x/en/run/) to trigger something after each push (or for each commit). If you want a mirror of an external repository into you SCM-Manager you could also check out the SCM-Repository-Mirror-Plugin (https://scm-manager.org/plugins/scm-repository-mirror-plugin/docs/1.0.x/en/create/).
 
- I think it would be great if the SCM Manager website showcased some good examples and documentation on how to use the Webhook or Script-Plugins beyond what's currently there.  I believe the functionality is powerful but not knowing the API's of SCM or where to find them I'm not sure how I might perform operations on every commit (for example getting a Continous Integration system to kick off a task).

We already have something like this planned in our roadmap. It may take a few more weeks or months, but our public SCM Manager instance with many examples will come.
 
 
3+4) Again thanks for your feedback. I already addressed your suggestions to our UX designer and we will discuss this internally.
 

One other minor GUI feedback -- it would be nice to have some knobs to control what shows up on the 'Activities' plug-in.

I have the 'Activities' plug-in installed but have disabled checking for plug-in updates since that slows login times.  As a resut the Activities history is populated with lots of 'Couldn't get plug-in status'.

I would personally recommend you to use the landingpage-plugin (https://scm-manager.org/plugins/scm-landingpage-plugin/releases/) instead of the activity plugin. There you can see the latest events and have even more additional functions. Nevertheless, in both plugins it is not possible to filter the events via a configuration. 

By the way, checking for plugin updates should not noticeably slow down your server startup / login. Do you happen to have an example of this or can tell us how exactly you found this?
 

Thank you again!

--
You received this message because you are subscribed to the Google Groups "scmmanager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scmmanager+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scmmanager/23713-1623946382-115058%40sneakemail.com.


--

Mit freundlichen Grüßen 

Eduard Heimbuch


// Cloudogu GmbH 
// Brabandtstraße 9-10 38100 Braunschweig

// Tel.:+49. 531. 2 35 28-901
// Fax:+49. 531. 2 35 28-19
// Web:cloudogu.com

// Geschäftsführer: T. Friedrich, T. Grosser, T. Paliga 
// Gerichtsstand: Braunschweig Amtsgericht Braunschweig HRB 204974

---------------------------------------------------------------------- 
Diese E-Mail und ihre Anhänge sind nur zu dem Gebrauch durch den beabsichtigten Empfänger bestimmt und können rechtlich geschützte oder vertrauliche Informationen enthalten. Sollten Sie weder der beabsichtigte Empfänger noch zur Zustellung an diesen berechtigt sein, so ist jede Weitergabe, Vervielfältigung oder sonstige Nutzung dieser E-Mail oder ihrer Anhänge zu unterlassen. Wenn Sie diese Mitteilung irrtümlich erhalten haben, benachrichtigen Sie bitte umgehend den Absender und löschen die Mitteilung. 
----------------------------------------------------------------------

5usc2...@liamekaens.com

unread,
Jul 27, 2021, 1:07:59 AM7/27/21
to scmma...@googlegroups.com

This is a follow-up regarding an older thread about naming repositories on disk.

On 2021-06-20 23:11, Eduard Heimbuch eduard.heimbuch-at-cloudogu.com  wrote:

 
- I'd like to make a feature request which I can file via GitHub if that's more appropriate.  Request:  Option to have repository on disk named the same as what is entered via GUI.
 
When I created a repository named 'TEST_REPO'  I found it on disk as /var/lib/scm/repository/3HSaNrqIH9 .  I renamed the repository by hand to 'TEST_REPO' and modified /var/lib/scm/config/repository-paths.xml and changing 2nd part of the key value pair with the repo_id like this  <repository id="3HSaNrqIH9">repositories/TEST_REPO</repository> and things seem to work.  So it seems SCM-Manager could potentially do this for users automatically if the option existed in the GUI.
 
I see your point, but your requested change would break many of our internal apis. The internal data stores we use depend on the repository id. If the id would be changed like in your request, it will be really hard to find out where the data belong. 
 
We had your proposed concept in SCM-Manager V1 and therefore could not implement a "rename" function.

I am confused by this statement.  In my example above I did not change the repository ID, I changed the 2nd part of the value part of the key/value store and re-named the folder on disk as well and everything works (including Redmine directly accessing the folder, etc).

Before rename:

root@scm:/var/lib/scm/config# cat repository-paths.xml
<?xml version="1.0" encoding="UTF-8"?>
<repositories creation-time="1623738981217" last-modified="1625986455376">
<repository id="3HSaNrqIH9">repositories/3HSaNrqIH9</repository>
</repositories>

After rename:

root@scm:/var/lib/scm/config# cat repository-paths.xml
<?xml version="1.0" encoding="UTF-8"?>
<repositories creation-time="1623738981217" last-modified="1625986455376">


<repository id="3HSaNrqIH9">repositories/TEST_REPO</repository>

</repositories>


5usc2...@liamekaens.com

unread,
Jul 27, 2021, 1:08:07 AM7/27/21
to scmma...@googlegroups.com

This is a follow-up regarding an older thread about naming repositories on disk.

On 2021-06-20 23:11, Eduard Heimbuch eduard.heimbuch-at-cloudogu.com  wrote:

 
- I'd like to make a feature request which I can file via GitHub if that's more appropriate.  Request:  Option to have repository on disk named the same as what is entered via GUI.
 
When I created a repository named 'TEST_REPO'  I found it on disk as /var/lib/scm/repository/3HSaNrqIH9 .  I renamed the repository by hand to 'TEST_REPO' and modified /var/lib/scm/config/repository-paths.xml and changing 2nd part of the key value pair with the repo_id like this  <repository id="3HSaNrqIH9">repositories/TEST_REPO</repository> and things seem to work.  So it seems SCM-Manager could potentially do this for users automatically if the option existed in the GUI.
 
I see your point, but your requested change would break many of our internal apis. The internal data stores we use depend on the repository id. If the id would be changed like in your request, it will be really hard to find out where the data belong. 
 
We had your proposed concept in SCM-Manager V1 and therefore could not implement a "rename" function.

I am confused by this statement.  In my example above I did not change the repository ID, I changed the 2nd part of the value part of the key/value store and re-named the folder on disk as well and everything works (including Redmine directly accessing the folder, etc).

Before rename:

root@scm:/var/lib/scm/config# cat repository-paths.xml
<?xml version="1.0" encoding="UTF-8"?>
<repositories creation-time="1623738981217" last-modified="1625986455376">
<repository id="3HSaNrqIH9">repositories/3HSaNrqIH9</repository>
</repositories>

After rename:

root@scm:/var/lib/scm/config# cat repository-paths.xml
<?xml version="1.0" encoding="UTF-8"?>
<repositories creation-time="1623738981217" last-modified="1625986455376">

<repository id="3HSaNrqIH9">repositories/TEST_REPO</repository>

</repositories>


Reply all
Reply to author
Forward
0 new messages