This puts Vorta on PyQt6 and starts a new main branch 0.9.
---------
Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
Co-authored-by: Manu <3916435+m3nu@users.noreply.github.com>
Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
Borg v1.2.4 added new change types called `mtime` and `ctime` for the modification and the creation time of a file.
Our diff json parser doesn't support these changes yet.
The plain text parser doesn't need to be updated since it is only used for earlier versions of borg.
This also extends the tooltip in the diff view to show changes in `ctime` or `mtime` in a localised manner.
* src/vorta/views/diff_result.py (ChangeType): Add `CTIME` and `MTIME` linking to `MODIFIED`.
* src/vorta/views/diff_result.py (DiffData): Add fields `ctime_change` and `mtime_change`.
* src/vorta/views/diff_result.py (parse_diff_json): Parse the new change types.
* src/vorta/views/diff_result.py (DiffTree.data): Add time changes to tooltip in a human readable format.
* tests/test_diff.py : Update test data to include new change types. Add additional test cases for unittesting the new change types.
This adds trailing lines to files,
removes trailing white space in all the other lines and unifies line endings.
Additionally it formats the test code with `black`.
* src/vorta/assets/UI/diffresult.ui : Replace `okButton` with `QDialogButtonBox`
that has a `close` button.
* src/vorta/views/diff_result.py : Connect `buttonBox` instead of `okButton` to Dialog.
* src/vorta/assets/UI/diffresult.ui : Add title to `DiffResult` dialog and simplify file name display.
* src/vorta/assets/UI/diffresult.ui : Add comboBox to change display mode of tree view.
* src/vorta/views/diff_result.py : Connect comboBox to `DiffTree`.
* src/vorta/application.py : Remove `eventFilter` setup for palette changes.
* src/vorta/tray_menu.py : Connect directly to `app.paletteChanged`.
* src/vorta/views/archive_tab.py
* src/vorta/views/repo_tab.py
* src/vorta/views/schedule_tab.py
* src/vorta/views/source_tab.py
* src/vorta/assets/UI/diffresult.ui : Add buttons to keep folders on top when sorting and
to expand and collapse all items.
* src/vorta/views/diff_result.py : Connect the added buttons.
* src/vorta/assets/icons/angle-up-solid.svg : Add icon for `bCollapseAll`.
* src/vorta/views/diff_result.py : Add context menu to `treeView` that allows expanding
and copying of an item.
* src/vorta/views/diff_result.py : Add copy shortcut to `treeView`.
Subclass `treemodel.FileTreeModel` for the purposes of the diff dialog.
Rewrite diff output parsing.
Add sorting through `QSortFilterProxyModel`.
* src/vorta/views/diff_result.py (DiffResult.__init__): Remove doubled if statement.
* src/vorta/views/diff_result.py : Rename `DiffResult` to `DiffResultDialog`.
* src/vorta/views/diff_result.py (DiffTree.__init__): Remove the use of `QVariant`.
Since python has no type enforcement `QVariant` is not needed.
* src/vorta/views/diff_result.py (DiffTree): Subclass `treemodel.FileTreeModel` and add additional info tooltip.
* src/vorta/views/diff_result.py (parse_diff_json): Some changes for use with new model.
* src/vorta/views/diff_result.py (parse_diff_lines): Full regex based line parsing and
other modifications to go with the new model.
* src/vorta/views/diff_result.py (FileType): Enum of possible file types.
* src/vorta/views/diff_result.py (ChangeType): Enum of possible change types.
Currently all are mapped to `ADDED`, `MODIFIED` and `REMOVED`.
* src/vorta/views/diff_result.py (calc_size): Rename to `size_to_byte`.
* src/vorta/assets/UI/diffresult.ui : Move `alternatingRowColours` to the .ui file.
* src/vorta/views/diff_result.py (DiffResultDialog): Move `alternatingRowColours` to the .ui file.
* tests/test_diff.py : Fix tests for diff parser.
* src/vorta/views/diff_result.py : Connect to `sorted` of `DiffSortProxyModel`
to reveal selected items in view.
* src/vorta/views/partials/treemodel.py : Add `FileTreeSortProxyModel` with abstract code.
* src/vorta/views/diff_result.py (DiffSortProxyModel): Implement `FileTreeSortProxyModel`.
* src/vorta/views/diff_result.py (DiffItem): This variable holds the type `FileSystemItem[DiffData]`.
Scheduler now has the ability to run jobs on multiple repositories concurrently and run multiple jobs on one repo (by queuing them).
For each repository, there is one queue. I have represented a queue by a 'site'. Between sites (ie repository), tasks run concurrently. On one site, tasks run one by one. The user also run tasks by adding them to the queue but he can't run multiple backups because start backup button is disabled when a job is running.
* fix issue #940 - KeyError in get_dict_from_list
- cause of error : defaultdict added more defaultdict while attempting to traverse the tree, but once a 'potential leaf' node was added, it was added as a dict, not a defaultdict.
- two possible solutions:
- 1 - change everywhere that adds a 'potential' leaf node to add a defaultdict (ie nested_dict()) - this occurs in several places, but not many.
- 2 - change get_dict_from_list to add a default dict (not defaultdict) when traversing the tree, for the case where a multi-level node is added on top of an existing node. This requires only changing a single location, and means that the dictionaries returned by accessing the tree will behave like normal dict (ie, won't by default add missing keys).
* Add test case for issues #940 and #925
* add support for 'diff --json-lines' available in borg 1.1.16.
* fixes issue #901 (diff not handling CR/LF in filenames)
* improve `pretty_bytes()` formatting function