-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make bob archive work remotely #617
base: master
Are you sure you want to change the base?
Conversation
I want to get some first feedback from your side. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #617 +/- ##
==========================================
- Coverage 88.95% 88.37% -0.58%
==========================================
Files 48 49 +1
Lines 15614 15887 +273
==========================================
+ Hits 13889 14040 +151
- Misses 1725 1847 +122 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sure. First of all, this feature is very much appreciated. It's been on the TODO list for a long time. 👍 Before reviewing the code in detail, a couple of things that I noticed:
Code wise, I think the circular dependency between the webdav and archive modules needs to be properly resolved. IMHO, the webdav module should throw HTTP errors. That will require some adaptation in the archive module but this hack to resolve the circular dependency is, well, just a hack... |
Yes, sounds reasonable, with an option like
Sounds good to me. There could be an argument like
I will have a look at this together with the explicit selection.
I think this is also a good idea.
Good idea. I will have a look at this, too. |
Yes, sounds good. |
cd10be3
to
832f424
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This turned out to be quite a lot of comments. I certainly did not catch everything yet but I hope you bear with me...
No, thank you, this is great. |
832f424
to
5f86327
Compare
I think I have managed to go through all your remarks. |
currently working with local and http/webdav repositories
added argument -l/--local to archive cmd that will execute the archive cmd in the current directory
…override -n/--names: a comma-separated list of archives to work on (names from user config) -a/--all: use all suitable archives from user config
used to specify archives that support deleting/iterating files, required for archive cmd
5f86327
to
ea74301
Compare
Thanks. I'll have a look on the weekend (hopefully). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks quite good already. Would it be possible to add some testing for the Webdav parts? Maybe (re)use the HTTP mock server from the unit tests to have some minimally responsive Webdav server? Otherwise this is basically all untested and I fear it will break unnoticed whenever we touch the archive stuff...
@@ -23,15 +22,19 @@ | |||
class ArchiveScanner: | |||
CUR_VERSION = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We must bump the version because the schema changed.
@@ -500,6 +500,12 @@ def doArchive(argv, bobRoot): | |||
""".format(subHelp)) | |||
parser.add_argument("-l", "--local", action='store_true', | |||
help="ignore the archive configuration and work on the current directory") | |||
parser.add_argument("-a", "--all", action='store_true', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use a add_mutually_exclusive_group
for -l
, -a
and -b
. That way, only one of them can be given and we do not have to define a precedence.
relates to issue #340