Add developer’s contact information to Smalltalk/X configuration
To check current configuration at Workspace execute (Do It
):
-
UserPreferences current historyManagerSignature
My configuration was#('magnetron' 'tukan')
(computer name and userid). -
For new configuration execute code below in Workspace (fill your own details):
1
2
UserPreferences current historyManagerSignature: 'Patrik Svestka <email>'.
UserPreferences current save.
To check manually your configuration open ~/.smalltalk/settings.stx
file. Mine was:
1
UserPreferences current at:#'history-manager.signatures' put:(Dictionary new at:#('magnetron' 'tukan') put:'Patrik Svestka <email>'; yourself).
Mercurial Smalltalk/X configuration
From launcher select System/Settings
. Select Source Code Management
:
Source code management at settings
-
Change a default repository to:
Mercurial+
. If you plan on creating a custom module create<prefix>:*
in Module, make sure it is aMercurial+ *Repository Type*. For example, I have
ps:*(Module), which has
Mercurial+` (Repository Type) as you can see on the above screenshot. -
Expand the
Source Code Management
and selectMercurial+
: Mercurial+ settings - I) Find the
hg
command. In linux it usually is/usr/bin/hg
. If you have custom path, browse it and select the executable. - II) After finding the
hg
binary click on the Edit button to edit the .hgrc mercurial file. Make sure you have your contact details filled in correctly. These details will be used when you commit your code directly via mercurial and not via Smalltalk/X. The details belong to the[ui]
section:
For example:
1
2
[ui]
username = Patrik Svestka <email>
Save then the file and click on the Save button. It saves the configuration into the Smalltalk/X configuration file.
Note: The mercurial configuration file can differ between Linux (.hgrc
) and Windows (.hgrc
or Mercurial.ini
). To check which file is used for your operating system check the source code of HGConfig>>userConfigFiles
.
Here is the current copy:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
userConfigFiles
"Return a list of per-user config files"
OperatingSystem isMSWINDOWSlike ifTrue:[
^{
Filename homeDirectory / '.hgrc' .
Filename homeDirectory / 'Mercurial.ini'
}
].
OperatingSystem isUNIXlike ifTrue:[
^{
Filename homeDirectory / '.hgrc' .
}
].
self error:'Unsupported operating system'
"Created: / 06-12-2012 / 20:30:11 / Jan Vrany <email>"
"Modified (format): / 06-12-2012 / 21:34:48 / Jan Vrany <email>"
Mercurial with Evolve extension
To use evolve extension, you have to first install it via:
pip install --user hg-evolve
To check that you have evole
extension installed:
1
2
pip list | grep hg-evolve
hg-evolve 10.5.0
To update your hg-evolve
run:
pip install --upgrade --user hg-evolve
The upgrade process will show on your terminal. To double check it:
1
2
pip list | grep hg-evolve
hg-evolve 10.5.1
Then the .hgrc file needs editing. In the [extension]
section (note: evolve path here is for Python3.9, customize as necessary):
1
2
[extensions]
evolve = /home/tukan/.local/lib/python3.9/site-packages/hgext3rd/evolve
Save then the file and click on the Save button in the Smalltalk/X to save your configuration.
Note: In this blog I’m using Smalltalk/x-jv branch, which is maintained by Jan Vraný. The upstream Smalltalk/X was created and build by Claus Gittinger. It is used in products developed by the eXept company.