Multiple Enhancements and Fixes
This release of mepo
has many enhancements.
Updates
Mepo Styles
With this PR, one can do:
mepo init --style <foo>
or:
mepo clone --style <foo> URL
and the --style <foo>
can be one of naked
, prefix
, and postfix
with the default as prefix
as that is the current dominant style.
These styles are prefix
leads to @subrepo
, postfix
leads to subrepo@
, and naked
leads to subrepo
when mepo
clones the subrepos
Mepo Config
Add support for a ~/.mepoconfig
file and adds a new command:
usage: mepo config [-h] {get,set,delete,print} ...
Runs config commands.
positional arguments:
{get,set,delete,print}
which has four subcommands. I tried to make it like git-config
in many respects, but I'm not that good at Python and Argparse so it's like many other mepo commands with subcommands.
NOTE: This capability is not as powerful as git-config
is. For example, this:
[alias]
ci = commit
is allowed. But this:
[alias]
cm = commit -m
is not. This is a limitation of what I could do in Python and with Argparse. You can make an alias of a command, but not any of the options of commands. And I couldn't figure out how to do aliases with subcommands.
For "style" (see above) the entry would be:
[init]
style = postfix
It's in the [init]
section because technically that is where the command is used. It's just that mepo clone
"piggybacks" on init
so that if you do:
mepo clone --style naked
it's actually doing:
mepo init --style naked
mepo clone
Examples
mepo config print
To print the .mepoconfig
file:
mepo config print
mepo config set
To set a value in the .mepoconfig
file:
mepo set alias.st status
In "gitconfig" style, this is equivalent to adding to the file:
[alias]
st = status
mepo config get
This command gets section.option
:
❯ mepo config get alias.st
[alias]
st = status
mepo config delete
This command deletes the section.option
from the file
Tagging Updates
Allow mepo tag create
and mepo tag delete
to work on all components if none are passed in.
Push-All
Created mepo push-all
to so one can do mepo push-all --tags
to push tags on all repos
ETA: Update to 1.32.0 and use mepo tag push
Fixes
Status and Compare Weirdness
This update uses git rev-list
to try and see if two tags are the same. This can then be used in status
and compare
so that just in case mepo
is seeing different tags, we can check if they point to the same commit. If they do, then we just "re-use" the original tag that mepo clone
used.