local commit is removed by permission error

Bug #302410 reported by Hitoshi
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Unassigned

Bug Description

Local commit was discarded on updating the local repository from the central repository.
While the updating, permission error occured.

To replicate this error, please execute the following code.

---------------------------------------------
#!/bin/sh

TARGET="file:///tmp/dir"
USER_NAME="userName"
ANOTHER_NAME="root" # ${USER_NAME} cannot modify this owner's file

mkdir hoge
cd hoge
bzr init
touch foo.txt
bzr add
bzr ci -m "test"
echo "push to ${TARGET}, password may be required"
bzr push ${TARGET}
echo "make local change"
mkdir bar
touch bar/bar.txt
bzr add
echo "make local commit"
bzr ci -m "local commit"
echo "change owner of the file (bar.txt), password may be required"
sudo chown -R ${ANOTHER_NAME} bar
echo "bind to ${TARGET}, password may be required"
bzr bind ${TARGET}
echo "update to commit local changes, password may be required"
bzr update
echo "recover owner of the file (bzr.txt)"
sudo chown -R ${USER_NAME} bar
echo "update to commit local changes, password may be required"
bzr update
echo ""
echo "where is my bar directory!? (commited localy)"

Tags: update
Revision history for this message
John A Meinel (jameinel) wrote :

I think this is actually (accidentally) fixed by
https://code.edge.launchpad.net/~gerard-/bzr/update/+merge/18464

Which was just merged into bzr.dev.

Specifically, the old 'update' code would take a 2-stage process to bringing in 'master' changes. It would first effectively 'revert' the working tree to the Master revision, and then try to re-merge the local changes back in.

Once that patch lands, it actually merges the master changes in directly, rather than reverting first.

Note: We should probably add this to the NEWS entry.

Changed in bzr:
milestone: none → 2.2.0b1
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.