As mentioned previously I am working toward getting Gitano into Stretch. Last time we spoke about lace, on which a colleague and friend of mine (Richard Maw) did a large pile of work. This time I'm going to discuss deprecation approaches and building more capability out of fewer features.
First, a little background -- Gitano is written in Lua which is a deliberately small language whose authors spend more time thinking about what they can remove from the language spec than they do what they could add in. I first came to Lua in the 3.2 days, a little before 4.0 came out. (The authors provide a lovely timeline in case you're interested.) With each of the releases of Lua which came after 3.2, I was struck with how the authors looked to take a number of features which the language had, and collapse them into more generic, more powerful, smaller, fewer features.
This approach to design stuck with me over the subsequent decade, and when I
began Gitano I tried to have the smallest number of core features/behaviours,
from which could grow the power and complexity I desired. Gitano is, at its
core, a set of files in a single format (clod) stored in a consistent manner
(Git) which mediate access to a resource (Git repositories). Some of those
files result in emergent properties such as the concept of the 'owner' of a
repository (though that can simply be considered the value of the
project.owner
property for the repository). Indeed the concept of the owner
of a repository is a fiction generated by the ACL system with a very small
amount of collusion from the core of Gitano. Yet until recently Gitano had a
first class command set-owner
which would alter that one configuration value.
[gitano] set-description ---- Set the repo's short description (Takes a repo)
[gitano] set-head ---- Set the repo's HEAD symbolic reference (Takes a repo)
[gitano] set-owner ---- Sets the owner of a repository (Takes a repo)
Those of you with Gitano installations may see the above if you ask it for help. Yet you'll also likely see:
[gitano] config ---- View and change configuration for a repository (Takes a repo)
The config
command gives you access to the repository configuration file
(which, yes, you could access over git instead, but the config command can be
delegated in a more fine-grained fashion without having to write hooks). Given
the config command has all the functionality of the three specific set-*
commands shown above, it was time to remove the specific commands.
Migrating
If you had automation which used the set-description
, set-head
, or
set-owner
commands then you will want to switch to the config command before
you migrate your server to the current or any future version of Gitano.
In brief, where you had:
ssh git@gitserver set-FOO repo something
You now need:
ssh git@gitserver config repo set project.FOO something
It looks a little more wordy but it is consistent with the other features that are keyed from the project configuration, such as:
ssh git@gitserver config repo set cgitrc.section Fooble Section Name
And, of course, you can see what configuration is present with:
ssh git@gitserver config repo show
Or look at a specific value with:
ssh git@gitserver config repo show specific.key
As always, you can get more detailed (if somewhat cryptic) help with:
ssh git@gitserver help config
Next time I'll try and touch on the new PGP/GPG integration support.