Data loss after failed uncommit & pull
(copied from IRC):
Hi, I've just done a bzr commit -m "commit message" while I had deleted some files inside my repo. Then, I did bzr uncommit because I forgot to pull from launchpad first. It gave an error containing the file name of one of the files I deleted, and now all files are the same as in the latest rev. of the bzr branch. In other words: all my changes are gone. Does anyone know how to recover them? (if possible?)
http://
the pull modifies the files I changed (most importantly: modules/
I hope someone can help me, there are two days of work in that file :(.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Bazaar Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Marten de Vries
- Solved:
- 2013-03-31
- Last query:
- 2013-03-31
- Last reply:
- 2013-03-30
John A Meinel (jameinel) said : | #1 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2013-03-30 23:11, Marten de Vries wrote:
> New question #225506 on Bazaar:
> https:/
>
> (copied from IRC):
>
> Hi, I've just done a bzr commit -m "commit message" while I had
> deleted some files inside my repo. Then, I did bzr uncommit because
> I forgot to pull from launchpad first. It gave an error containing
> the file name of one of the files I deleted, and now all files are
> the same as in the latest rev. of the bzr branch. In other words:
> all my changes are gone. Does anyone know how to recover them? (if
> possible?)
>
> http://
> pull modifies the files I changed (most importantly:
> modules/
>
> I hope someone can help me, there are two days of work in that file
> :(.
>
Since you had committed (before the uncommit), you have this entry:
Uncommitting from {<email address hidden>}
to {<email address hidden>}
You should be able to do something like:
bzr branch /home/marten/
revid:<email address hidden>
That should create a branch for you at the point before you did the
uncommit.
At which point you can make sure your branch is up-to-date with trunk
(pull, whatever), and pristine, and then bzr merge ../3.x-test.
Also, when bzr deletes/reverts files, if it sees the content is
unreproducible (not simply the state from an update, but locally
modified), it will produce a "foo.~1~" sort of file. Which should
contain whatever local modifications you had before the pull/revert/etc.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://
iEYEARECAAYFAlF
wu0AnAzlxIiv6wU
=f329
-----END PGP SIGNATURE-----
The ~1~ files were not there, but the branching of a specific revid worked. Got my data back :)
If the failed uncommit is a bug, I can provide the branch for investigation if you want. Just subscribe me to the bug report if that happens to be the case.
Thanks a lot.