'bzr update' destroyed all my local commits. Help!

I think something bad could happen to my changes.

For recording, I used git, hg and svn with overall success before. My understanding of bzr is less complete.

Here is what I have (Windows XP):

1) Folder created using bzr svn checkout. Call it stable
2) A folder branched from the one I used for development. Name this development

My plan was to use commit -local in the development branch to track changes, and this worked swelling.

Then I did an update to bzr (because it complained when I tried to click). At that time, stable had a much older copy of the code. Well, now the development has the same old copy. "bzr log" does not show any evidence of my local commits!

Can someone explain to me what happened and what can I do to restore the old code?

+3
source share
2 answers

Ok, I found it. After some crazy search, I discovered the secret code word "dead head" after looking at this other stack question: Some code was lost after bzr commit --local, bzr pull, bzr commit

, , . , http://chrismarinos.com/don-t-loose-your-head-with-bazaar/

, heads -all, pull get :

bzr heads --all
bzr pull --overwrite -r revid:<revision-id>

3 4 .

+5

, , - , ( ), - bzr pull --overwrite bzr revert bzr pull .

, , . , , bzr, . , , , , . , . , , . , , Bazaar. , #bzr FreeNode IRC, . IRC, , , , . Python , , , , .

, , โ€‹โ€‹, " ", , . , , , . :

$ bzr init-repo project; cd project
$ bzr branch bzr+ssh://example.org/srv/bzr/project/trunk trunk
$ bzr branch trunk my-feature-branch
$ cd my-feature-branch
 ... work, commit; work, commit; ...
$ cd ../trunk
$ bzr pull
$ bzr merge ../my-feature-branch
 ... resolve any merge conflicts here, if any ...
$ bzr ci -m 'Merge in my-feature-branch'
$ bzr push :parent

upsteam, . , .

+5

Source: https://habr.com/ru/post/1779688/


All Articles