Merge lp:~jtv/launchpad/recife-check-conflicts into lp:~launchpad/launchpad/recife
Status: | Merged |
---|---|
Approved by: | Graham Binns |
Approved revision: | no longer in the source branch. |
Merged at revision: | 9163 |
Proposed branch: | lp:~jtv/launchpad/recife-check-conflicts |
Merge into: | lp:~launchpad/launchpad/recife |
Prerequisite: | lp:~jtv/launchpad/recife-retire-traits-helpers |
Diff against target: |
469 lines (+219/-27) 7 files modified
lib/lp/translations/interfaces/potmsgset.py (+8/-2) lib/lp/translations/interfaces/translationmessage.py (+2/-1) lib/lp/translations/model/potmsgset.py (+98/-15) lib/lp/translations/model/translationmessage.py (+4/-2) lib/lp/translations/tests/test_clearcurrenttranslation.py (+14/-1) lib/lp/translations/tests/test_potmsgset.py (+77/-5) lib/lp/translations/tests/test_translationmessage.py (+16/-1) |
To merge this branch: | bzr merge lp:~jtv/launchpad/recife-check-conflicts |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+33494@code.launchpad.net |
Commit message
Consistent support for conflict checks.
Description of the change
= Check for Translation Conflicts =
For the Recife feature branch. This implements more consistent support for translation conflict checks.
It's something we're already doing in the data model we have in production: when a translation is changed (whether through the web UI or through an import), a timestamp can be given that basically says, "this is when I looked at the state of this translation and decided to change it." The methods that change the translation can then check whether someone else might have set a new translation in the meantime; if they have, the later change is effectively obsolete.
Here I change the higher-level methods that set translations to accept a lock_timestamp, and check.
You'll notice that _checkForConflict builds on the existing _maybeRaiseTran
To test:
{{{
./bin/test -vvc -m lp.translations
}}}
Jeroen