Skip to content
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

Add option to restrict rsync to one file system #1600

Merged
merged 16 commits into from
Feb 4, 2024
Merged

Add option to restrict rsync to one file system #1600

merged 16 commits into from
Feb 4, 2024

Conversation

fallingrock
Copy link
Contributor

@fallingrock fallingrock commented Jan 6, 2024

Added the ability to include the --one-file-system option on the rsync command.

This will prevent rsync from going into file systems on other devices and systems.

Fix #1598

@buhtz buhtz self-assigned this Jan 7, 2024
@buhtz
Copy link
Member

buhtz commented Jan 7, 2024

Dear David,
thanks a lot for this contribution. I will have a look onto it.

We need to discuss this in the team but I would say we wait until the upcoming release (round about 15th January) before we merge this. But it is just a (slow-down) feeling of myself. There is no strict technical reason.

@buhtz buhtz added this to the 2rd release from now milestone Jan 7, 2024
@buhtz
Copy link
Member

buhtz commented Jan 7, 2024

I excluded the Travis job for Python3.12 on a ppc64le machine because of an unfixed Issue on the site of TravisCI. I am in contact with their support.

Open todos for the team:

  • Question: Wait until next release?
  • Please review the English strings. I am not an expert here.

Copy link
Member

@emtiu emtiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the spelling consistent with the other options. Careful: Just editing here, I haven't had a chance to test this code.

CHANGES Outdated Show resolved Hide resolved
common/config.py Outdated Show resolved Hide resolved
common/config.py Outdated Show resolved Hide resolved
common/tools.py Outdated Show resolved Hide resolved
qt/settingsdialog.py Outdated Show resolved Hide resolved
qt/settingsdialog.py Outdated Show resolved Hide resolved
@buhtz
Copy link
Member

buhtz commented Jan 7, 2024

Thanks for the review. Do you think we should wait until the (in two weeks) upcoming release?

Make the spelling consistent with the other options.

I agree that consistence will improve code quality in most cases. But ( 😄 ) in this case my focus was more on resources. To the best of my recollection, the decision was not final, but we somehow agreed to stick to PEP8 as a minimal and in the Python world well known and accepted coding style. I would take this into account no matter that it will result in style-mixed code files.
IMHO saying "We are sticking to it because it has always been like this." won't help improving BIT in the long run.

In the end I will stick to the teams opinion here. I am very flexible about that. ❤️

@fallingrock
Copy link
Contributor Author

Thanks.

As I said, I'm a newbie when it comes to python, so I'm not familiar with standards. I was copying existing code.

@buhtz
Copy link
Member

buhtz commented Jan 7, 2024

As I said, I'm a newbie when it comes to python, so I'm not familiar with standards. I was copying existing code.

You did a good job. No problem. It is usual that PRs are slightly modified by maintainers.

@buhtz
Copy link
Member

buhtz commented Feb 2, 2024

OK, I updated to the latest upstream "dev".
I did some manual tests and checked the debug output. Seems to work.

How do we decide about the naming style of the methods involved in this PR? Keep the old non-PEP8 naming convention (e.g. oneFileSystem()) or beginn with PEP8 conformance (e.g. one_file_system()) no matter that this will currently create a mix of two standards in the code? As a PEP8-fanatic I vote for the latter. 🤣

Any objects against merging this?

@aryoda
Copy link
Contributor

aryoda commented Feb 2, 2024

beginn with PEP8 conformance (e.g. one_file_system()) no matter that this will currently create a mix of two standards in the code

I also prefer using underscores as word separator due to better readability even though we will have a mix for next years (or decades ;-) I guess.

'that the user specified, and also the analogous recursion '
'on the receiving side during deletion. Also keep in mind '
'that rsync treats a "bind" mount to the same device as '
'being on the same filesystem.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

longest tooltip I ever saw ;-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are much more of this from-rsync-manpage-copy-and-pasted-tooltips. That is why I introduced the wrapping, to prevent translators from dealing with line breaks them selfs.

@emtiu
Copy link
Member

emtiu commented Feb 2, 2024

How do we decide about the naming style of the methods involved in this PR? Keep the old non-PEP8 naming convention (e.g. oneFileSystem()) or beginn with PEP8 conformance (e.g. one_file_system()) no matter that this will currently create a mix of two standards in the code? As a PEP8-fanatic I vote for the latter. 🤣

I don't like the idea of introducing a new naming scheme with for one function, so that it is different from all its siblings.

But my objection is not very strong, so you may go ahead.

@buhtz
Copy link
Member

buhtz commented Feb 2, 2024

I don't like the idea of introducing a new naming scheme with for one function, so that it is different from all its siblings.

Sounds reasonable to me. Also might confuse extern contributors.

@buhtz
Copy link
Member

buhtz commented Feb 3, 2024

Now I set it back to camel case. 🤣
I think it is even better to modify such PEP8 related things (nearly) en bloc .

@buhtz buhtz merged commit c65fc91 into bit-team:dev Feb 4, 2024
1 check passed
@fallingrock fallingrock deleted the one-file-system branch February 4, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to exclude network file systems
4 participants