softwarefactory-project / rdopkg

power to the packagers
Apache License 2.0
29 stars 21 forks source link

Backing out patches by mistake with update-patches should at least raise a warning #46

Closed djipko closed 7 years ago

djipko commented 8 years ago

Hey Team rdopkg!

Having the dist-git branches up to date, but a potentially stale -patches branch can cause patches to be backed out by mistake and can be tricky to notice.

We might want to ask for confirmation if it's clear that we are backing out patches. This is a legitimate thing to happen on rebases, but still might be a good warning to have as rebases happen less often than single patch updates, which should normally never back out patches.

Thoughts?

yac commented 8 years ago

Please provide an example.

I don't quite understand as patch and new-version reset local patches branches to the remote one unless you explicitly disable it.

apevec commented 8 years ago

@djipko needinfo ^

djipko commented 8 years ago

So yeah - in case of patch and new-version I guess it's OK. Basically any action that has the reset_patches_branch sub-action will be fine.

Still if you just use update-patches (as I sometimes do since I'm an analogue kind of guy) it will happily back out patches without warning. The reason I noticed this is because I wasn't the only one who got tripped up by this.

So I guess the request here is to make it super explicit, even if you want to use a low level action like update_patches, that you are backing stuff out and that you might want to double check that.

I hope it's clearer now.

yac commented 8 years ago

update-patches just mirrors patches branch into distgit patches, nothing more. If you want safety and stuff, you're supposed to use patch or new-version. When you use low level update-patches directly, you need to know what you're doing and inspect the result with git diff to make sure it did what you expected.

You are welcome to implement a warning or whatever countermeasure you see fit to fix your problem ;)