-
Notifications
You must be signed in to change notification settings - Fork 7
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 a Special User Mode #1
base: master
Are you sure you want to change the base?
Conversation
In user mode (when the redaction ID is 0) redact_changeset.rb does not redact the objects. As an replacement, it writes a file of commands which call woodpeck's redaction.pl script. https://github.com/woodpeck/osm-revert-scripts In some cases you do not want to redact changes because their license is ok but you want to revert them. Reverts are difficult if later changes have been applied to the edited objects (you get conflicts). If you can solve the conflicts automatically (has some downsides), you can revert them easier. The script calling redaction.pl which is written as an output, can be used by a DWG member to redact the old versions later if the need to redact them arises.
7da0d4c
to
31f8e88
Compare
What would sample output look like? |
Sorry for the late response. My master thesis was more important. :-) The sample output would look like this (master dev API, changeset 98356):
|
👎 If redaction is needed, this code can do so itself. |
pnorman wrote:
There are use cases when a quick revert is important to reduce the number of conflicts. After the revert the DWG can still decide wether the old versions should be redacted or not. The redaction bot has the advantage of automatic conflict resolution. This makes it useable for reverts which do not need a redaction but have hundreds of conflicts. Of course, its user should know how the redaction bot solves conflicts. :-) |
I'm still not seeing the use. If a changeset has been reverted it doesn't stop a redaction from being done on the same changeset. |
Also, if outputting a list of object versions it should be in the edits blacklist format that the redaction code expects. |
@pnorman, you're right in saying that the link to the perl scripts is superfluous. However this change does have merit nonetheless, namely if someone wants to use the redaction bot's advanced conflict management to revert and not redact a number of changesets. If the user does not have moderator privileges on the API, the redaction bot will nonetheless issue a ton of "redact" requests against the API that will all fail. Having a switch that says "don't attempt redaction, just make the changes" is an improvement that supports this non-moderator use case. |
The point is that we have a format for a list of objects to redact - the output should be in the same format the bot reads. |
This pull request adds a mode I call "user mode". The redaction ID is 0 in this mode and no redactions (only reverts) are done. As an replacement, redact_changeset.rb writes a script which calls woodpeck's redaction.pl script.
In some cases you do not want to redact changes (or you lack the permissions) because their license is ok but you want to revert them. Reverts are difficult if later changes have been applied to the edited objects (you get conflicts). If you can solve the conflicts automatically (has some downsides), you can revert them easier. The script calling redaction.pl which is written as an output, can be used by a DWG member to redact the old versions later if the need to redact them arises.
I act resposibly. Therefor, I am still doing manual tests on the Dev API (my accounts are Nakaner-repair-dev and Nakaner-dev) before I will use redact_changeset.pl on the live database. This pull request just proposes a merge of the improvements I have done yet.