local commit is removed by permission error
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=
USER_NAME=
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)"
I think this is actually (accidentally) fixed by /code.edge. launchpad. net/~gerard- /bzr/update/ +merge/ 18464
https:/
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.