mud-git 0.0.post1.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mud_git-0.0.post1.dev1/.github/workflows/publish-aur.yaml +36 -0
- mud_git-0.0.post1.dev1/.github/workflows/publish-pypi.yaml +38 -0
- mud_git-0.0.post1.dev1/.github/workflows/test.yaml +98 -0
- mud_git-0.0.post1.dev1/.gitignore +160 -0
- mud_git-0.0.post1.dev1/LICENSE +21 -0
- mud_git-0.0.post1.dev1/PKG-INFO +139 -0
- mud_git-0.0.post1.dev1/PKGBUILD +35 -0
- mud_git-0.0.post1.dev1/README.md +102 -0
- mud_git-0.0.post1.dev1/img.png +0 -0
- mud_git-0.0.post1.dev1/pyproject.toml +32 -0
- mud_git-0.0.post1.dev1/requirements.txt +1 -0
- mud_git-0.0.post1.dev1/setup.cfg +4 -0
- mud_git-0.0.post1.dev1/src/mud/__init__.py +18 -0
- mud_git-0.0.post1.dev1/src/mud/app.py +269 -0
- mud_git-0.0.post1.dev1/src/mud/commands.py +27 -0
- mud_git-0.0.post1.dev1/src/mud/config.py +99 -0
- mud_git-0.0.post1.dev1/src/mud/runner.py +500 -0
- mud_git-0.0.post1.dev1/src/mud/settings.py +51 -0
- mud_git-0.0.post1.dev1/src/mud/styles.py +96 -0
- mud_git-0.0.post1.dev1/src/mud/utils.py +126 -0
- mud_git-0.0.post1.dev1/src/mud_git.egg-info/PKG-INFO +139 -0
- mud_git-0.0.post1.dev1/src/mud_git.egg-info/SOURCES.txt +24 -0
- mud_git-0.0.post1.dev1/src/mud_git.egg-info/dependency_links.txt +1 -0
- mud_git-0.0.post1.dev1/src/mud_git.egg-info/entry_points.txt +2 -0
- mud_git-0.0.post1.dev1/src/mud_git.egg-info/requires.txt +1 -0
- mud_git-0.0.post1.dev1/src/mud_git.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Publish to AUR
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: ["Test"]
|
|
6
|
+
types:
|
|
7
|
+
- completed
|
|
8
|
+
push:
|
|
9
|
+
tags:
|
|
10
|
+
- 'v*.*.*'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
aur-publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v2
|
|
17
|
+
|
|
18
|
+
- name: Get Version from Tag
|
|
19
|
+
id: get_version
|
|
20
|
+
run: echo "VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_ENV
|
|
21
|
+
|
|
22
|
+
- name: Update PKGBUILD with New Version
|
|
23
|
+
run: |
|
|
24
|
+
sed -i "s/^pkgver=.*/pkgver=${{ env.VERSION }}/" PKGBUILD
|
|
25
|
+
cat PKGBUILD
|
|
26
|
+
|
|
27
|
+
- name: Publish AUR package
|
|
28
|
+
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
|
|
29
|
+
with:
|
|
30
|
+
pkgname: mud-git
|
|
31
|
+
pkgbuild: ./PKGBUILD
|
|
32
|
+
commit_username: ${{ secrets.AUR_USERNAME }}
|
|
33
|
+
commit_email: ${{ secrets.AUR_EMAIL }}
|
|
34
|
+
ssh_private_key: ${{ secrets.AUR_SSH_KEY }}
|
|
35
|
+
commit_message: Update AUR package
|
|
36
|
+
ssh_keyscan_types: rsa,ecdsa,ed25519
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Publish Python Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: ["Test"]
|
|
6
|
+
types:
|
|
7
|
+
- completed
|
|
8
|
+
push:
|
|
9
|
+
tags:
|
|
10
|
+
- 'v*.*.*'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
deploy:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Check out the repository
|
|
18
|
+
uses: actions/checkout@v3
|
|
19
|
+
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@v4
|
|
22
|
+
with:
|
|
23
|
+
python-version: '3.12'
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install build twine
|
|
29
|
+
|
|
30
|
+
- name: Build the package
|
|
31
|
+
run: python -m build
|
|
32
|
+
|
|
33
|
+
- name: Publish to PyPI
|
|
34
|
+
env:
|
|
35
|
+
TWINE_USERNAME: "__token__"
|
|
36
|
+
TWINE_PASSWORD: ${{ secrets.TWINE_PAT }}
|
|
37
|
+
run: |
|
|
38
|
+
twine upload dist/*
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- '*'
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- master
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
test:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- name: Set up Python 3.12
|
|
20
|
+
uses: actions/setup-python@v3
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
- name: Install dependencies and set up the environment
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install -r requirements.txt
|
|
26
|
+
python -m pip install requests build
|
|
27
|
+
|
|
28
|
+
python -m build
|
|
29
|
+
pip install dist/*.whl
|
|
30
|
+
- name: Create repositories
|
|
31
|
+
run: |
|
|
32
|
+
git config --global user.name "Jasur Sadikov"
|
|
33
|
+
git config --global user.email "test@test.com"
|
|
34
|
+
|
|
35
|
+
for i in {1..3}; do
|
|
36
|
+
mkdir "repo_$i"
|
|
37
|
+
cd "repo_$i"
|
|
38
|
+
echo "repo_$i" > test.txt
|
|
39
|
+
git init
|
|
40
|
+
git add .
|
|
41
|
+
git commit -m "Initial commit"
|
|
42
|
+
cd ..
|
|
43
|
+
done
|
|
44
|
+
- name: Initialize
|
|
45
|
+
run: |
|
|
46
|
+
mud init
|
|
47
|
+
- name: Test remove by path
|
|
48
|
+
run: |
|
|
49
|
+
for i in {1..3}; do
|
|
50
|
+
mud remove repo_$i
|
|
51
|
+
done
|
|
52
|
+
- name: Test add with label
|
|
53
|
+
run: |
|
|
54
|
+
for i in {1..3}; do
|
|
55
|
+
mud add label_$i repo_$i
|
|
56
|
+
done
|
|
57
|
+
mud lb
|
|
58
|
+
- name: Test remove label
|
|
59
|
+
run: |
|
|
60
|
+
for i in {1..3}; do
|
|
61
|
+
mud remove label_$i
|
|
62
|
+
done
|
|
63
|
+
mud lb
|
|
64
|
+
- name: Add all repositories with labels
|
|
65
|
+
run: |
|
|
66
|
+
rm .mudconfig
|
|
67
|
+
mud init
|
|
68
|
+
for i in {1..3}; do
|
|
69
|
+
mud add label_$i repo_$i
|
|
70
|
+
done
|
|
71
|
+
mud lb
|
|
72
|
+
- name: Test default commands
|
|
73
|
+
run: |
|
|
74
|
+
echo "mud labels"
|
|
75
|
+
mud labels
|
|
76
|
+
echo "mud status"
|
|
77
|
+
mud status
|
|
78
|
+
echo "mud info"
|
|
79
|
+
mud info
|
|
80
|
+
echo "mud log"
|
|
81
|
+
mud log
|
|
82
|
+
echo "mud branch"
|
|
83
|
+
mud branch
|
|
84
|
+
echo "mud tags"
|
|
85
|
+
mud tags
|
|
86
|
+
- name: Test custom command
|
|
87
|
+
run: |
|
|
88
|
+
mud echo "Hello world"
|
|
89
|
+
mud -a echo "Hello world"
|
|
90
|
+
mud -a -t echo "Hello world"
|
|
91
|
+
mud -t echo "Hello world"
|
|
92
|
+
mud -t -c='echo "Hello" && echo "world"'
|
|
93
|
+
- name: Test label filtering
|
|
94
|
+
run: mud -l=label_1 echo "Hello world"
|
|
95
|
+
- name: Test branch filtering
|
|
96
|
+
run: |
|
|
97
|
+
mud -l=label_1 git checkout -b develop
|
|
98
|
+
mud -b=develop echo "Hello world"
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
110
|
+
.pdm.toml
|
|
111
|
+
|
|
112
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
113
|
+
__pypackages__/
|
|
114
|
+
|
|
115
|
+
# Celery stuff
|
|
116
|
+
celerybeat-schedule
|
|
117
|
+
celerybeat.pid
|
|
118
|
+
|
|
119
|
+
# SageMath parsed files
|
|
120
|
+
*.sage.py
|
|
121
|
+
|
|
122
|
+
# Environments
|
|
123
|
+
.env
|
|
124
|
+
.venv
|
|
125
|
+
env/
|
|
126
|
+
venv/
|
|
127
|
+
ENV/
|
|
128
|
+
env.bak/
|
|
129
|
+
venv.bak/
|
|
130
|
+
|
|
131
|
+
# Spyder project settings
|
|
132
|
+
.spyderproject
|
|
133
|
+
.spyproject
|
|
134
|
+
|
|
135
|
+
# Rope project settings
|
|
136
|
+
.ropeproject
|
|
137
|
+
|
|
138
|
+
# mkdocs documentation
|
|
139
|
+
/site
|
|
140
|
+
|
|
141
|
+
# mypy
|
|
142
|
+
.mypy_cache/
|
|
143
|
+
.dmypy.json
|
|
144
|
+
dmypy.json
|
|
145
|
+
|
|
146
|
+
# Pyre type checker
|
|
147
|
+
.pyre/
|
|
148
|
+
|
|
149
|
+
# pytype static type analyzer
|
|
150
|
+
.pytype/
|
|
151
|
+
|
|
152
|
+
# Cython debug symbols
|
|
153
|
+
cython_debug/
|
|
154
|
+
|
|
155
|
+
# PyCharm
|
|
156
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
157
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
158
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
159
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
160
|
+
.idea/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Jasur Sadikov
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: mud-git
|
|
3
|
+
Version: 0.0.post1.dev1
|
|
4
|
+
Summary: Multi repository git utility. Manage multiple git-repositories simultaneously.
|
|
5
|
+
Author-email: Jasur Sadikov <jasur@sadikoff.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2024 Jasur Sadikov
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/jasursadikov/mud
|
|
29
|
+
Project-URL: Issues, https://github.com/jasursadikov/mud/issues
|
|
30
|
+
Classifier: Programming Language :: Python :: 3
|
|
31
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
32
|
+
Classifier: Operating System :: OS Independent
|
|
33
|
+
Requires-Python: >=3.12
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
License-File: LICENSE
|
|
36
|
+
Requires-Dist: prettytable
|
|
37
|
+
|
|
38
|
+
# mud
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+

|
|
42
|
+
[](https://github.com/jasursadikov/mud/actions/workflows/test.yaml)
|
|
43
|
+
[](https://github.com/jasursadikov/mud/actions/workflows/publish-pypi.yaml)
|
|
44
|
+
[](https://github.com/jasursadikov/mud/actions/workflows/publish-aur.yaml)
|
|
45
|
+
|
|
46
|
+

|
|
47
|
+
|
|
48
|
+
mud is a multi-directory git runner which allows you to run git commands in a multiple repositories. It has multiple powerful tools filtering tools and support of aliasing. This tool is not limited to git commands only, you can run any commands as you wish, but this tool was primarily designed to be used with git, so each referenced directory should have `.git`.
|
|
49
|
+
|
|
50
|
+
## Installing
|
|
51
|
+
For PyPI
|
|
52
|
+
```bash
|
|
53
|
+
pip install mud-git
|
|
54
|
+
```
|
|
55
|
+
For Arch Linux
|
|
56
|
+
```bash
|
|
57
|
+
paru -S mud-git
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Getting started
|
|
61
|
+
|
|
62
|
+
1. Run `mud config` to start interactive wizard which help you to set the preferable settings. Check [settings](#settings) section for more. At the end, `.mudsettings` file will appear at your home directory that you can alter in the future.
|
|
63
|
+
2. Locate to your preferable directory with repositories.
|
|
64
|
+
3. Run `mud init` command to create `.mudconfig` file. This file is important to keep references to repositories. All repositories in current dictionary would be included to `.mudconfig`.
|
|
65
|
+
4. Optional: Run [`mud --set-global`](#global-mudconfig) to make current configuration default and reachable from any directory.
|
|
66
|
+
|
|
67
|
+
All entries are stored in `.mudconfig` in TSV format. After making your first entry, you can open `.mudconfig` in a text editor and modify it according to your needs.
|
|
68
|
+
|
|
69
|
+
### Global .mudconfig
|
|
70
|
+
- `mud --set-global` - sets current `.mudconfig` as a global configuration, so it would be used as a fallback configuration to run from any directory.
|
|
71
|
+
|
|
72
|
+
## Using
|
|
73
|
+
|
|
74
|
+
### Commands
|
|
75
|
+
`mud <FILTER> <COMMAND>` will execute bash command across all repositories. To filter repositories check [arguments](#arguments) section.
|
|
76
|
+
|
|
77
|
+
- `mud info`/`mud i` - displays branch divergence and working directory changes.
|
|
78
|
+
- `mud status`/`mud st` - displays working directory changes.
|
|
79
|
+
- `mud log`/`mud l` - displays latest commit message, it's time and it's author.
|
|
80
|
+
- `mud labels`/`mud lb` - displays mud labels across repositories.
|
|
81
|
+
- `mud branch`/`mud br` - displays all branches in repositories.
|
|
82
|
+
- `mud remote-branch`/`mud rbr` - displays all branches in repositories.
|
|
83
|
+
- `mud tags`/`mud t` - displays git tags in repositories.
|
|
84
|
+
|
|
85
|
+
### Arguments
|
|
86
|
+
- `-l=<label>` or `--label=<label>` - includes repositories with provided label.
|
|
87
|
+
- `-nl=<label>` or `--not-label=<label>` - excludes repositories with provided label.
|
|
88
|
+
- `-b=<branch>` or `--branch=<branch>` - includes repositories with provided branch.
|
|
89
|
+
- `-nb=<branch>` or `--not-branch=<branch>` - excludes repositories with provided label.
|
|
90
|
+
- `-c` or `--command` - explicit command argument. Use this whenever you're trying to run a complex command.
|
|
91
|
+
- `-m` or `--modified` - filters out modified repositories.
|
|
92
|
+
- `-d` or `--diverged` - filters repositories with diverged branches.
|
|
93
|
+
- `-t` or `--table` - toggles default table view setting for run.
|
|
94
|
+
- `-a` or `--async` - toggles asynchronous run feature.
|
|
95
|
+
|
|
96
|
+
Example:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
mud -b=master -d git pull
|
|
100
|
+
# Filters out all repos with master branch and diverged branches and then runs pull command.
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Settings
|
|
104
|
+
|
|
105
|
+
Settings are stored in your home directory in `.mudsettings` file.
|
|
106
|
+
|
|
107
|
+
- `run_async = 0/1` - enables asynchronous commands.
|
|
108
|
+
- `run_table = 0/1` - enables asynchronous commands in a table view. Requires `run_async`.
|
|
109
|
+
- `nerd_fonts = 0/1` - use nerd fonts in the output 💅.
|
|
110
|
+
- `show_borders = 0/1` - enables borders in table view.
|
|
111
|
+
- `collapse_paths = 0/1` - simplifies branch name in the branch view.
|
|
112
|
+
- `config_path = /home/user/path/.mudconfig` - this is set up by `mud --set-global` [command](#global-mudconfig).
|
|
113
|
+
|
|
114
|
+
### Aliases
|
|
115
|
+
|
|
116
|
+
You can create your own aliases for commands. To create your own aliases, edit .mudsettings file, `[alias]` section. .mudsettings has the following aliases by default:
|
|
117
|
+
|
|
118
|
+
```ini
|
|
119
|
+
[alias]
|
|
120
|
+
to = git checkout
|
|
121
|
+
fetch = git fetch
|
|
122
|
+
pull = git pull
|
|
123
|
+
push = git push
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Labeling
|
|
127
|
+
|
|
128
|
+
You can modify your .mudconfig file by using following commands:
|
|
129
|
+
|
|
130
|
+
### Adding and labeling repositories
|
|
131
|
+
|
|
132
|
+
- `mud add <label> <path>` - adds path with an optional label.
|
|
133
|
+
- `mud add <path>` - adds path without a label.
|
|
134
|
+
|
|
135
|
+
### Removing labels and repositories
|
|
136
|
+
|
|
137
|
+
- `mud remove <label>` - removes label from all directories.
|
|
138
|
+
- `mud remove <path>` - removes directory with a specified path.
|
|
139
|
+
- `mud remove <label> <path>` - removes label from a directory.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Maintainer: Jasur Sadikov <jasur@sadikoff.com>
|
|
2
|
+
pkgname=mud-git
|
|
3
|
+
pkgver=1.0.0
|
|
4
|
+
pkgrel=1
|
|
5
|
+
pkgdesc="Multi repository git utility. Manage multiple git-repositories simultaneously."
|
|
6
|
+
arch=('any')
|
|
7
|
+
url="https://github.com/jasursadikov/mud"
|
|
8
|
+
license=('MIT')
|
|
9
|
+
provides=("${pkgname}")
|
|
10
|
+
conflicts=("${pkgname}")
|
|
11
|
+
depends=(
|
|
12
|
+
'python'
|
|
13
|
+
'python-prettytable'
|
|
14
|
+
'git')
|
|
15
|
+
makedepends=(
|
|
16
|
+
'python-build'
|
|
17
|
+
'python-installer'
|
|
18
|
+
'python-wheel'
|
|
19
|
+
'python-hatchling'
|
|
20
|
+
'python-setuptools'
|
|
21
|
+
'python-setuptools-scm'
|
|
22
|
+
)
|
|
23
|
+
source=("${pkgname}::git+${url}")
|
|
24
|
+
md5sums=('SKIP')
|
|
25
|
+
|
|
26
|
+
build() {
|
|
27
|
+
cd "$srcdir/$pkgname"
|
|
28
|
+
python -m build --wheel --no-isolation
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
package() {
|
|
32
|
+
cd "$srcdir/$pkgname"
|
|
33
|
+
python -m installer --destdir="$pkgdir" dist/*.whl
|
|
34
|
+
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
35
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# mud
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
[](https://github.com/jasursadikov/mud/actions/workflows/test.yaml)
|
|
6
|
+
[](https://github.com/jasursadikov/mud/actions/workflows/publish-pypi.yaml)
|
|
7
|
+
[](https://github.com/jasursadikov/mud/actions/workflows/publish-aur.yaml)
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
mud is a multi-directory git runner which allows you to run git commands in a multiple repositories. It has multiple powerful tools filtering tools and support of aliasing. This tool is not limited to git commands only, you can run any commands as you wish, but this tool was primarily designed to be used with git, so each referenced directory should have `.git`.
|
|
12
|
+
|
|
13
|
+
## Installing
|
|
14
|
+
For PyPI
|
|
15
|
+
```bash
|
|
16
|
+
pip install mud-git
|
|
17
|
+
```
|
|
18
|
+
For Arch Linux
|
|
19
|
+
```bash
|
|
20
|
+
paru -S mud-git
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Getting started
|
|
24
|
+
|
|
25
|
+
1. Run `mud config` to start interactive wizard which help you to set the preferable settings. Check [settings](#settings) section for more. At the end, `.mudsettings` file will appear at your home directory that you can alter in the future.
|
|
26
|
+
2. Locate to your preferable directory with repositories.
|
|
27
|
+
3. Run `mud init` command to create `.mudconfig` file. This file is important to keep references to repositories. All repositories in current dictionary would be included to `.mudconfig`.
|
|
28
|
+
4. Optional: Run [`mud --set-global`](#global-mudconfig) to make current configuration default and reachable from any directory.
|
|
29
|
+
|
|
30
|
+
All entries are stored in `.mudconfig` in TSV format. After making your first entry, you can open `.mudconfig` in a text editor and modify it according to your needs.
|
|
31
|
+
|
|
32
|
+
### Global .mudconfig
|
|
33
|
+
- `mud --set-global` - sets current `.mudconfig` as a global configuration, so it would be used as a fallback configuration to run from any directory.
|
|
34
|
+
|
|
35
|
+
## Using
|
|
36
|
+
|
|
37
|
+
### Commands
|
|
38
|
+
`mud <FILTER> <COMMAND>` will execute bash command across all repositories. To filter repositories check [arguments](#arguments) section.
|
|
39
|
+
|
|
40
|
+
- `mud info`/`mud i` - displays branch divergence and working directory changes.
|
|
41
|
+
- `mud status`/`mud st` - displays working directory changes.
|
|
42
|
+
- `mud log`/`mud l` - displays latest commit message, it's time and it's author.
|
|
43
|
+
- `mud labels`/`mud lb` - displays mud labels across repositories.
|
|
44
|
+
- `mud branch`/`mud br` - displays all branches in repositories.
|
|
45
|
+
- `mud remote-branch`/`mud rbr` - displays all branches in repositories.
|
|
46
|
+
- `mud tags`/`mud t` - displays git tags in repositories.
|
|
47
|
+
|
|
48
|
+
### Arguments
|
|
49
|
+
- `-l=<label>` or `--label=<label>` - includes repositories with provided label.
|
|
50
|
+
- `-nl=<label>` or `--not-label=<label>` - excludes repositories with provided label.
|
|
51
|
+
- `-b=<branch>` or `--branch=<branch>` - includes repositories with provided branch.
|
|
52
|
+
- `-nb=<branch>` or `--not-branch=<branch>` - excludes repositories with provided label.
|
|
53
|
+
- `-c` or `--command` - explicit command argument. Use this whenever you're trying to run a complex command.
|
|
54
|
+
- `-m` or `--modified` - filters out modified repositories.
|
|
55
|
+
- `-d` or `--diverged` - filters repositories with diverged branches.
|
|
56
|
+
- `-t` or `--table` - toggles default table view setting for run.
|
|
57
|
+
- `-a` or `--async` - toggles asynchronous run feature.
|
|
58
|
+
|
|
59
|
+
Example:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
mud -b=master -d git pull
|
|
63
|
+
# Filters out all repos with master branch and diverged branches and then runs pull command.
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Settings
|
|
67
|
+
|
|
68
|
+
Settings are stored in your home directory in `.mudsettings` file.
|
|
69
|
+
|
|
70
|
+
- `run_async = 0/1` - enables asynchronous commands.
|
|
71
|
+
- `run_table = 0/1` - enables asynchronous commands in a table view. Requires `run_async`.
|
|
72
|
+
- `nerd_fonts = 0/1` - use nerd fonts in the output 💅.
|
|
73
|
+
- `show_borders = 0/1` - enables borders in table view.
|
|
74
|
+
- `collapse_paths = 0/1` - simplifies branch name in the branch view.
|
|
75
|
+
- `config_path = /home/user/path/.mudconfig` - this is set up by `mud --set-global` [command](#global-mudconfig).
|
|
76
|
+
|
|
77
|
+
### Aliases
|
|
78
|
+
|
|
79
|
+
You can create your own aliases for commands. To create your own aliases, edit .mudsettings file, `[alias]` section. .mudsettings has the following aliases by default:
|
|
80
|
+
|
|
81
|
+
```ini
|
|
82
|
+
[alias]
|
|
83
|
+
to = git checkout
|
|
84
|
+
fetch = git fetch
|
|
85
|
+
pull = git pull
|
|
86
|
+
push = git push
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Labeling
|
|
90
|
+
|
|
91
|
+
You can modify your .mudconfig file by using following commands:
|
|
92
|
+
|
|
93
|
+
### Adding and labeling repositories
|
|
94
|
+
|
|
95
|
+
- `mud add <label> <path>` - adds path with an optional label.
|
|
96
|
+
- `mud add <path>` - adds path without a label.
|
|
97
|
+
|
|
98
|
+
### Removing labels and repositories
|
|
99
|
+
|
|
100
|
+
- `mud remove <label>` - removes label from all directories.
|
|
101
|
+
- `mud remove <path>` - removes directory with a specified path.
|
|
102
|
+
- `mud remove <label> <path>` - removes label from a directory.
|
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling", "setuptools-scm"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "mud-git"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
authors = [{ name = "Jasur Sadikov", email = "jasur@sadikoff.com" }]
|
|
9
|
+
description = "Multi repository git utility. Manage multiple git-repositories simultaneously."
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = { file = "LICENSE" }
|
|
12
|
+
requires-python = ">=3.12"
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
]
|
|
18
|
+
dependencies = ["prettytable"]
|
|
19
|
+
|
|
20
|
+
[tool.setuptools_scm]
|
|
21
|
+
version_scheme = "no-guess-dev"
|
|
22
|
+
local_scheme = "no-local-version"
|
|
23
|
+
|
|
24
|
+
[tool.hatch.build.targets.wheel]
|
|
25
|
+
packages = ["src/mud"]
|
|
26
|
+
|
|
27
|
+
[project.scripts]
|
|
28
|
+
mud = "mud:run"
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://github.com/jasursadikov/mud"
|
|
32
|
+
Issues = "https://github.com/jasursadikov/mud/issues"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
prettytable
|