mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-05 16:18:02 +01:00
Compare commits
5 Commits
ff2681e196
...
0.54.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a9d86a6bf | ||
|
|
4fd3ea9e3c | ||
|
|
041dc013f9 | ||
|
|
12802103c4 | ||
|
|
bf28b46954 |
17
CHANGES.rst
17
CHANGES.rst
@@ -1,10 +1,25 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
0.53.0 (2025-11-30)
|
||||
0.54.0 (2025-12-03)
|
||||
-------------------
|
||||
------------------------
|
||||
|
||||
Fix
|
||||
~~~
|
||||
- Send INFO/DEBUG to stdout, WARNING/ERROR to stderr. [Rodos]
|
||||
|
||||
Fixes #182
|
||||
|
||||
Other
|
||||
~~~~~
|
||||
- Docs: update README testing section and add fetch vs pull explanation.
|
||||
[Rodos]
|
||||
|
||||
|
||||
0.53.0 (2025-11-30)
|
||||
-------------------
|
||||
|
||||
Fix
|
||||
~~~
|
||||
- Case-sensitive username filtering causing silent backup failures.
|
||||
|
||||
26
README.rst
26
README.rst
@@ -308,6 +308,25 @@ Skip existing on incomplete backups
|
||||
The ``--skip-existing`` argument will skip a backup if the directory already exists, even if the backup in that directory failed (perhaps due to a blocking error). This may result in unexpected missing data in a regular backup.
|
||||
|
||||
|
||||
Updates use fetch, not pull
|
||||
---------------------------
|
||||
|
||||
When updating an existing repository backup, ``github-backup`` uses ``git fetch`` rather than ``git pull``. This is intentional - a backup tool should reliably download data without risk of failure. Using ``git pull`` would require handling merge conflicts, which adds complexity and could cause backups to fail unexpectedly.
|
||||
|
||||
With fetch, **all branches and commits are downloaded** safely into remote-tracking branches. The working directory files won't change, but your backup is complete.
|
||||
|
||||
If you look at files directly (e.g., ``cat README.md``), you'll see the old content. The new data is in the remote-tracking branches (confusingly named "remote" but stored locally). To view or use the latest files::
|
||||
|
||||
git show origin/main:README.md # view a file
|
||||
git merge origin/main # update working directory
|
||||
|
||||
All branches are backed up as remote refs (``origin/main``, ``origin/feature-branch``, etc.).
|
||||
|
||||
If you want to browse files directly without merging, consider using ``--bare`` which skips the working directory entirely - the backup is just the git data.
|
||||
|
||||
See `#269 <https://github.com/josegonzalez/python-github-backup/issues/269>`_ for more discussion.
|
||||
|
||||
|
||||
Github Backup Examples
|
||||
======================
|
||||
|
||||
@@ -357,7 +376,12 @@ A huge thanks to all the contibuters!
|
||||
Testing
|
||||
-------
|
||||
|
||||
This project currently contains no unit tests. To run linting::
|
||||
To run the test suite::
|
||||
|
||||
pip install pytest
|
||||
pytest
|
||||
|
||||
To run linting::
|
||||
|
||||
pip install flake8
|
||||
flake8 --ignore=E501
|
||||
|
||||
@@ -16,12 +16,23 @@ from github_backup.github_backup import (
|
||||
retrieve_repositories,
|
||||
)
|
||||
|
||||
logging.basicConfig(
|
||||
format="%(asctime)s.%(msecs)03d: %(message)s",
|
||||
# INFO and DEBUG go to stdout, WARNING and above go to stderr
|
||||
log_format = logging.Formatter(
|
||||
fmt="%(asctime)s.%(msecs)03d: %(message)s",
|
||||
datefmt="%Y-%m-%dT%H:%M:%S",
|
||||
level=logging.INFO,
|
||||
)
|
||||
|
||||
stdout_handler = logging.StreamHandler(sys.stdout)
|
||||
stdout_handler.setLevel(logging.DEBUG)
|
||||
stdout_handler.addFilter(lambda r: r.levelno < logging.WARNING)
|
||||
stdout_handler.setFormatter(log_format)
|
||||
|
||||
stderr_handler = logging.StreamHandler(sys.stderr)
|
||||
stderr_handler.setLevel(logging.WARNING)
|
||||
stderr_handler.setFormatter(log_format)
|
||||
|
||||
logging.basicConfig(level=logging.INFO, handlers=[stdout_handler, stderr_handler])
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
|
||||
@@ -1 +1 @@
|
||||
__version__ = "0.53.0"
|
||||
__version__ = "0.54.0"
|
||||
|
||||
Reference in New Issue
Block a user