simple-vcs 1.1.0__tar.gz → 1.2.0__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.
- {simple_vcs-1.1.0/simple_vcs.egg-info → simple_vcs-1.2.0}/PKG-INFO +23 -3
- {simple_vcs-1.1.0 → simple_vcs-1.2.0}/README.md +20 -1
- {simple_vcs-1.1.0 → simple_vcs-1.2.0}/pyproject.toml +4 -3
- {simple_vcs-1.1.0 → simple_vcs-1.2.0}/setup.py +3 -2
- simple_vcs-1.2.0/simple_vcs/cli.py +146 -0
- simple_vcs-1.2.0/simple_vcs/core.py +569 -0
- {simple_vcs-1.1.0 → simple_vcs-1.2.0/simple_vcs.egg-info}/PKG-INFO +23 -3
- simple_vcs-1.2.0/simple_vcs.egg-info/requires.txt +2 -0
- simple_vcs-1.1.0/simple_vcs/cli.py +0 -81
- simple_vcs-1.1.0/simple_vcs/core.py +0 -382
- simple_vcs-1.1.0/simple_vcs.egg-info/requires.txt +0 -1
- {simple_vcs-1.1.0 → simple_vcs-1.2.0}/LICENSE +0 -0
- {simple_vcs-1.1.0 → simple_vcs-1.2.0}/MANIFEST.in +0 -0
- {simple_vcs-1.1.0 → simple_vcs-1.2.0}/requirements.txt +0 -0
- {simple_vcs-1.1.0 → simple_vcs-1.2.0}/setup.cfg +0 -0
- {simple_vcs-1.1.0 → simple_vcs-1.2.0}/simple_vcs/__init__.py +0 -0
- {simple_vcs-1.1.0 → simple_vcs-1.2.0}/simple_vcs/utils.py +0 -0
- {simple_vcs-1.1.0 → simple_vcs-1.2.0}/simple_vcs.egg-info/SOURCES.txt +0 -0
- {simple_vcs-1.1.0 → simple_vcs-1.2.0}/simple_vcs.egg-info/dependency_links.txt +0 -0
- {simple_vcs-1.1.0 → simple_vcs-1.2.0}/simple_vcs.egg-info/entry_points.txt +0 -0
- {simple_vcs-1.1.0 → simple_vcs-1.2.0}/simple_vcs.egg-info/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: simple-vcs
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary: A simple version control system with
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: A beautiful and simple version control system with a modern terminal interface
|
|
5
5
|
Home-page: https://github.com/muhammadsufiyanbaig/simple_vcs
|
|
6
6
|
Author: Muhammad Sufiyan Baig
|
|
7
7
|
Author-email: Muhammad Sufiyan Baig <send.sufiyan@gmail.com>
|
|
@@ -34,6 +34,7 @@ Requires-Python: >=3.7
|
|
|
34
34
|
Description-Content-Type: text/markdown
|
|
35
35
|
License-File: LICENSE
|
|
36
36
|
Requires-Dist: click>=7.0
|
|
37
|
+
Requires-Dist: rich>=10.0.0
|
|
37
38
|
Dynamic: author
|
|
38
39
|
Dynamic: home-page
|
|
39
40
|
Dynamic: license-file
|
|
@@ -41,7 +42,15 @@ Dynamic: requires-python
|
|
|
41
42
|
|
|
42
43
|
# SimpleVCS
|
|
43
44
|
|
|
44
|
-
A simple version control system written in Python that provides basic VCS functionality similar to Git
|
|
45
|
+
A simple version control system written in Python that provides basic VCS functionality similar to Git - now with a **beautiful modern terminal interface**!
|
|
46
|
+
|
|
47
|
+
## ✨ New in Version 1.2.0
|
|
48
|
+
|
|
49
|
+
**Stunning Visual Interface** - SimpleVCS now features a gorgeous terminal interface powered by Rich:
|
|
50
|
+
- 🎨 **Colored Output** - Color-coded messages for success, warnings, and errors
|
|
51
|
+
- 📊 **Beautiful Tables** - Commit history and status displayed in elegant tables
|
|
52
|
+
- 📦 **Styled Panels** - Information presented in clean, bordered boxes
|
|
53
|
+
- 🌟 **Professional Look** - Modern, easy-to-read formatting throughout
|
|
45
54
|
|
|
46
55
|
## Features
|
|
47
56
|
|
|
@@ -240,6 +249,7 @@ When initialized, SimpleVCS creates a `.svcs` directory containing:
|
|
|
240
249
|
|
|
241
250
|
- Python 3.7 or higher
|
|
242
251
|
- click>=7.0 (for CLI functionality)
|
|
252
|
+
- rich>=10.0.0 (for beautiful terminal interface)
|
|
243
253
|
|
|
244
254
|
## Development
|
|
245
255
|
|
|
@@ -317,6 +327,16 @@ Project Link: [https://github.com/muhammadsufiyanbaig/simple_vcs](https://github
|
|
|
317
327
|
|
|
318
328
|
## Changelog
|
|
319
329
|
|
|
330
|
+
### Version 1.2.0
|
|
331
|
+
- **Beautiful Terminal Interface**: Complete visual overhaul with Rich library
|
|
332
|
+
- **Colored Output**: Green for success, yellow for warnings, red for errors
|
|
333
|
+
- **Elegant Tables**: Commit history, status, and diffs in formatted tables
|
|
334
|
+
- **Styled Panels**: Information displayed in bordered panels with rounded corners
|
|
335
|
+
- **Enhanced Commands**: All commands now have beautiful, professional output
|
|
336
|
+
- **Better UX**: Clear visual hierarchy and consistent formatting
|
|
337
|
+
- **Windows Compatible**: No problematic Unicode characters
|
|
338
|
+
- **Enhanced Help**: Detailed descriptions and examples for all commands
|
|
339
|
+
|
|
320
340
|
### Version 1.1.0
|
|
321
341
|
- Added quick revert functionality to go back to any commit instantly
|
|
322
342
|
- Added snapshot creation and restoration features
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# SimpleVCS
|
|
2
2
|
|
|
3
|
-
A simple version control system written in Python that provides basic VCS functionality similar to Git
|
|
3
|
+
A simple version control system written in Python that provides basic VCS functionality similar to Git - now with a **beautiful modern terminal interface**!
|
|
4
|
+
|
|
5
|
+
## ✨ New in Version 1.2.0
|
|
6
|
+
|
|
7
|
+
**Stunning Visual Interface** - SimpleVCS now features a gorgeous terminal interface powered by Rich:
|
|
8
|
+
- 🎨 **Colored Output** - Color-coded messages for success, warnings, and errors
|
|
9
|
+
- 📊 **Beautiful Tables** - Commit history and status displayed in elegant tables
|
|
10
|
+
- 📦 **Styled Panels** - Information presented in clean, bordered boxes
|
|
11
|
+
- 🌟 **Professional Look** - Modern, easy-to-read formatting throughout
|
|
4
12
|
|
|
5
13
|
## Features
|
|
6
14
|
|
|
@@ -199,6 +207,7 @@ When initialized, SimpleVCS creates a `.svcs` directory containing:
|
|
|
199
207
|
|
|
200
208
|
- Python 3.7 or higher
|
|
201
209
|
- click>=7.0 (for CLI functionality)
|
|
210
|
+
- rich>=10.0.0 (for beautiful terminal interface)
|
|
202
211
|
|
|
203
212
|
## Development
|
|
204
213
|
|
|
@@ -276,6 +285,16 @@ Project Link: [https://github.com/muhammadsufiyanbaig/simple_vcs](https://github
|
|
|
276
285
|
|
|
277
286
|
## Changelog
|
|
278
287
|
|
|
288
|
+
### Version 1.2.0
|
|
289
|
+
- **Beautiful Terminal Interface**: Complete visual overhaul with Rich library
|
|
290
|
+
- **Colored Output**: Green for success, yellow for warnings, red for errors
|
|
291
|
+
- **Elegant Tables**: Commit history, status, and diffs in formatted tables
|
|
292
|
+
- **Styled Panels**: Information displayed in bordered panels with rounded corners
|
|
293
|
+
- **Enhanced Commands**: All commands now have beautiful, professional output
|
|
294
|
+
- **Better UX**: Clear visual hierarchy and consistent formatting
|
|
295
|
+
- **Windows Compatible**: No problematic Unicode characters
|
|
296
|
+
- **Enhanced Help**: Detailed descriptions and examples for all commands
|
|
297
|
+
|
|
279
298
|
### Version 1.1.0
|
|
280
299
|
- Added quick revert functionality to go back to any commit instantly
|
|
281
300
|
- Added snapshot creation and restoration features
|
|
@@ -4,15 +4,16 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "simple-vcs"
|
|
7
|
-
version = "1.
|
|
8
|
-
description = "A simple version control system with
|
|
7
|
+
version = "1.2.0"
|
|
8
|
+
description = "A beautiful and simple version control system with a modern terminal interface"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Muhammad Sufiyan Baig", email = "send.sufiyan@gmail.com" }
|
|
11
11
|
]
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.7"
|
|
14
14
|
dependencies = [
|
|
15
|
-
"click>=7.0"
|
|
15
|
+
"click>=7.0",
|
|
16
|
+
"rich>=10.0.0"
|
|
16
17
|
]
|
|
17
18
|
license = { file = "LICENSE" }
|
|
18
19
|
keywords = ["version-control", "vcs", "simple-vcs", "backup", "snapshot"]
|
|
@@ -5,10 +5,10 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="simple-vcs",
|
|
8
|
-
version="1.
|
|
8
|
+
version="1.2.0",
|
|
9
9
|
author="Muhammad Sufiyan Baig",
|
|
10
10
|
author_email="send.sufiyan@gmail.com",
|
|
11
|
-
description="A simple version control system with
|
|
11
|
+
description="A beautiful and simple version control system with a modern terminal interface",
|
|
12
12
|
long_description=long_description,
|
|
13
13
|
long_description_content_type="text/markdown",
|
|
14
14
|
url="https://github.com/muhammadsufiyanbaig/simple_vcs",
|
|
@@ -29,6 +29,7 @@ setup(
|
|
|
29
29
|
python_requires=">=3.7",
|
|
30
30
|
install_requires=[
|
|
31
31
|
"click>=7.0",
|
|
32
|
+
"rich>=10.0.0",
|
|
32
33
|
],
|
|
33
34
|
entry_points={
|
|
34
35
|
"console_scripts": [
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import click
|
|
2
|
+
from .core import SimpleVCS
|
|
3
|
+
from rich.console import Console
|
|
4
|
+
|
|
5
|
+
console = Console()
|
|
6
|
+
|
|
7
|
+
@click.group()
|
|
8
|
+
@click.version_option(version="1.2.0", prog_name="SimpleVCS")
|
|
9
|
+
def main():
|
|
10
|
+
"""
|
|
11
|
+
SimpleVCS - A beautiful and simple version control system
|
|
12
|
+
|
|
13
|
+
A lightweight VCS with an intuitive interface for managing your project versions.
|
|
14
|
+
"""
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
@main.command()
|
|
18
|
+
@click.option('--path', default='.', help='Path where repository will be created')
|
|
19
|
+
def init(path):
|
|
20
|
+
"""Initialize a new SimpleVCS repository
|
|
21
|
+
|
|
22
|
+
Creates a new .svcs directory with all necessary files for version control.
|
|
23
|
+
|
|
24
|
+
Example: svcs init --path ./my-project
|
|
25
|
+
"""
|
|
26
|
+
vcs = SimpleVCS(path)
|
|
27
|
+
vcs.init_repo()
|
|
28
|
+
|
|
29
|
+
@main.command()
|
|
30
|
+
@click.argument('files', nargs=-1, required=True)
|
|
31
|
+
def add(files):
|
|
32
|
+
"""Add files to the staging area
|
|
33
|
+
|
|
34
|
+
Stage files to be included in the next commit. You can add multiple files at once.
|
|
35
|
+
|
|
36
|
+
Example: svcs add file1.txt file2.py
|
|
37
|
+
"""
|
|
38
|
+
vcs = SimpleVCS()
|
|
39
|
+
for file in files:
|
|
40
|
+
vcs.add_file(file)
|
|
41
|
+
|
|
42
|
+
@main.command()
|
|
43
|
+
@click.option('-m', '--message', help='Commit message describing the changes')
|
|
44
|
+
def commit(message):
|
|
45
|
+
"""Commit staged changes to the repository
|
|
46
|
+
|
|
47
|
+
Creates a new commit with all staged files. If no message is provided,
|
|
48
|
+
an automatic timestamp-based message will be generated.
|
|
49
|
+
|
|
50
|
+
Example: svcs commit -m "Add new feature"
|
|
51
|
+
"""
|
|
52
|
+
vcs = SimpleVCS()
|
|
53
|
+
vcs.commit(message)
|
|
54
|
+
|
|
55
|
+
@main.command()
|
|
56
|
+
@click.option('--c1', type=int, help='First commit ID (defaults to second-last commit)')
|
|
57
|
+
@click.option('--c2', type=int, help='Second commit ID (defaults to last commit)')
|
|
58
|
+
def diff(c1, c2):
|
|
59
|
+
"""Show differences between commits
|
|
60
|
+
|
|
61
|
+
Compare files between two commits to see what changed. Without arguments,
|
|
62
|
+
compares the last two commits.
|
|
63
|
+
|
|
64
|
+
Example: svcs diff --c1 1 --c2 3
|
|
65
|
+
"""
|
|
66
|
+
vcs = SimpleVCS()
|
|
67
|
+
vcs.show_diff(c1, c2)
|
|
68
|
+
|
|
69
|
+
@main.command()
|
|
70
|
+
@click.option('--limit', type=int, help='Maximum number of commits to display')
|
|
71
|
+
def log(limit):
|
|
72
|
+
"""Show commit history
|
|
73
|
+
|
|
74
|
+
Display a beautiful table of all commits with their messages, dates, and files.
|
|
75
|
+
Use --limit to show only recent commits.
|
|
76
|
+
|
|
77
|
+
Example: svcs log --limit 10
|
|
78
|
+
"""
|
|
79
|
+
vcs = SimpleVCS()
|
|
80
|
+
vcs.show_log(limit)
|
|
81
|
+
|
|
82
|
+
@main.command()
|
|
83
|
+
def status():
|
|
84
|
+
"""Show current repository status
|
|
85
|
+
|
|
86
|
+
Display information about the repository including current commit,
|
|
87
|
+
total commits, and staged files ready for commit.
|
|
88
|
+
|
|
89
|
+
Example: svcs status
|
|
90
|
+
"""
|
|
91
|
+
vcs = SimpleVCS()
|
|
92
|
+
vcs.status()
|
|
93
|
+
|
|
94
|
+
@main.command()
|
|
95
|
+
@click.argument('commit_id', type=int)
|
|
96
|
+
def revert(commit_id):
|
|
97
|
+
"""Revert to a specific commit
|
|
98
|
+
|
|
99
|
+
Quickly restore your repository to a previous commit state.
|
|
100
|
+
All files will be restored to their state at that commit.
|
|
101
|
+
|
|
102
|
+
Example: svcs revert 3
|
|
103
|
+
"""
|
|
104
|
+
vcs = SimpleVCS()
|
|
105
|
+
vcs.quick_revert(commit_id)
|
|
106
|
+
|
|
107
|
+
@main.command()
|
|
108
|
+
@click.option('--name', help='Custom name for the snapshot (optional)')
|
|
109
|
+
def snapshot(name):
|
|
110
|
+
"""Create a compressed snapshot
|
|
111
|
+
|
|
112
|
+
Creates a ZIP archive of your entire repository (excluding .svcs directory).
|
|
113
|
+
Perfect for backups or sharing your project.
|
|
114
|
+
|
|
115
|
+
Example: svcs snapshot --name my-backup
|
|
116
|
+
"""
|
|
117
|
+
vcs = SimpleVCS()
|
|
118
|
+
vcs.create_snapshot(name)
|
|
119
|
+
|
|
120
|
+
@main.command()
|
|
121
|
+
@click.argument('snapshot_path', type=click.Path(exists=True))
|
|
122
|
+
def restore(snapshot_path):
|
|
123
|
+
"""Restore from a snapshot
|
|
124
|
+
|
|
125
|
+
Restore your repository from a previously created snapshot ZIP file.
|
|
126
|
+
Current files will be replaced with snapshot contents.
|
|
127
|
+
|
|
128
|
+
Example: svcs restore snapshot_12345.zip
|
|
129
|
+
"""
|
|
130
|
+
vcs = SimpleVCS()
|
|
131
|
+
vcs.restore_from_snapshot(snapshot_path)
|
|
132
|
+
|
|
133
|
+
@main.command()
|
|
134
|
+
def compress():
|
|
135
|
+
"""Compress stored objects
|
|
136
|
+
|
|
137
|
+
Optimize repository storage by compressing object files.
|
|
138
|
+
Helps save disk space without losing any data.
|
|
139
|
+
|
|
140
|
+
Example: svcs compress
|
|
141
|
+
"""
|
|
142
|
+
vcs = SimpleVCS()
|
|
143
|
+
vcs.compress_objects()
|
|
144
|
+
|
|
145
|
+
if __name__ == '__main__':
|
|
146
|
+
main()
|