Hi, > From Lars's response: > > I just wanted to point out, that during step (3) the file "file_2.po" is > also merged with the current state in the VCS upstream repository. I am not > sure, if that was important for Wynand's example. > > That is really the problem. If other files are merged during an update, > one is likely to end up with corrupted translation files, since any > local changes will cause conflicts.
For now there is no locking during merge/update, thus conflicts can arise due to a bad timing. See more below. > I wasn't really clear with the problem I explained. > > With git, things go wrong if you modify files in your Pootle project > which have also been modified in the source repository. You can see the > problem below: > > [EMAIL PROTECTED]:~/workspace/test_area/poupdate/source_repo$ vi > abc.po > [EMAIL PROTECTED]:~/workspace/test_area/poupdate/source_repo$ git > commit -a > Created commit 69c409c: adw > 1 files changed, 1 insertions(+), 1 deletions(-) > [EMAIL PROTECTED]:~/workspace/test_area/poupdate/source_repo$ cd .. > [EMAIL PROTECTED]:~/workspace/test_area/poupdate$ cd test_repo/ > [EMAIL PROTECTED]:~/workspace/test_area/poupdate/test_repo$ vi > abc.po > [EMAIL PROTECTED]:~/workspace/test_area/poupdate/test_repo$ git pull > remote: Counting objects: 5, done. > remote: Compressing objects: 100% (3/3), done. > Unpacking objects: 100% (3/3), done. > remote: Total 3 (delta 1), reused 0 (delta 0) > From /home/wynand/workspace/test_area/poupdate/source_repo// > b219733..69c409c master -> origin/master > Updating b219733..69c409c > abc.po: needs update > error: Entry 'abc.po' not uptodate. Cannot merge. > > 1. Here I edited abc.po in the source repository and committed the change. > 2. Then I edited abc.po in Pootle's repository. > 3. Then I tried to pull changes. > 4. git complained. Thanks for explaining! The current code in translate/storage/versioncontrol/ does the following during an "update": 1) git checkout FILENAME 2) git pull REPO_ROOT_DIR Step (1) reverts local changes. Local modifications are preserved in pootle's memory at this moment. They get merged after step (2). Pootle would do the following for a "commit": 1) git add FILENAME 2) git push Your example shows, that it is necessary to "update" before "commit". The same issue is valid for subversion and probably also for the other VCS. Maybe we should change pootle's code to do an update before commit by default? Did I get your point now? > Thanks for the feedback Lars & Asheesh. I think we'll implement the > proposed solution. I hope it won't take too much time to make it work. this would be a great step forward! greetings, Lars ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Translate-pootle mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/translate-pootle
