Committing in a lightweight checkout stores revision in branch but does not update branch's files, expected?
If I have a branch (in a directory dir1), with a file named "a", make a lightweigtht checkout of it into directory dir2, edit the "a" file in dir2, "bzr gcommit" in dir2 and commit, then go into dir1 and do "bzr log" I see the new committed revision; but dir1/a is still old, it does not have the committed change ("bzr cat a" does show the committed change). And though it's old, different from the latest committed version, "bzr diff" shows nothing.
I think this is quite misleading: assume that after some time you look at dir1, see in "bzr log" that it is up-to-date, then start reading its files and modifying them: you are unknowingly reading/modifying old files.
cd /tmp
bzr init dir1
cd dir1
echo test > a
bzr add a
bzr gcommit
cd ..
bzr checkout --lightweight dir1 dir2
cd dir2
echo test2 > a
bzr gcommit
bzr log # shows rev 1 and 2, ok
cd ../dir1
bzr log # shows rev 1 and 2, ok
cat a # shows 'test' instead of 'test2' ??
bzr diff # shows nothing! so file is not identical to latest revision, and this does not show up in diff??
# more strangeness:
echo test3 > a
bzr diff # shows: - test + test3, so ignores "test2" ?? says that the latest line before edit was "test" ??
Shouldn't the commit, when done in dir2 and propagated to dir1, also cause an automatic "refresh" of files in dir1?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Bazaar Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- GuilhemBichot
- Solved:
- Last query:
- Last reply: