执行 bzr commit --local、bzr pull、bzr commit 后丢失了一些代码 [英] Some code was lost after doing bzr commit --local, bzr pull, bzr commit

查看:16
本文介绍了执行 bzr commit --local、bzr pull、bzr commit 后丢失了一些代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我团队的一个开发者一直在使用绑定到服务器的分支(IE,只使用checkout、update和commit),但也经常在提交时使用--local标志,然后批量提交到服务器.她最近遇到了一种情况,她丢失了一些本地提交,并且在 repo 或她的本地代码中找不到它们.她怀疑这是因为她在本地提交和服务器提交之间的某个时间点进行了拉取.

A developer in my team has been using a branch bound to the server (IE, only using checkout, update, and commit), but also often uses the --local flag on commit and then commits to the server in a batch. She recently experienced a situation where she is missing some local commits, and can't find them in the repo OR her local code. She suspects that this is because she did a pull at some point in bettween local commits and server commits.

我们都没有使用 Bazaar 的特别经验 -- 可能发生了什么,我们可以在哪里查找丢失的代码?她相当肯定她从未做过任何破坏性的事情,而且我相当肯定 Bazaar 会问她是否会这样做.我依稀记得 Bazaar 有一些隐藏"存储库/树/在更改一堆代码之前将东西放在哪里的概念,有人可能会从中恢复丢失的代码,但我无法设法通过谷歌搜索它.

Neither of us are particularly experience with Bazaar -- What may have happened, and where can we look for this missing code? She is fairly certain that she never did anything destructive, and I am fairly certain that Bazaar would have asked her if it was going to do that. I vaguely remember that Bazaar has some notion of "hidden" repos/trees/whatever where it puts things before changing a bunch of code, from which someone might recover lost code, but I can't manage to google for what that is.

推荐答案

我发现我所指的'隐藏' repos/trees/whatever"是dead head",用 bzr head 来查看.

I figured out that the "'hidden' repos/trees/whatever" that I was referring to are "dead heads", viewed with bzr heads.

我们找到了我们的死头并将其合并了 - 代码保存了!

We found our dead head and merged it back in -- code saved!

$ bzr heads
$ # output shows various heads, with names like: revision-id: john@mycomputer-20100630175358-39qro1z5qdq2o9ay(dead)
$ bzr merge john@mycomputer-20100630175358-39qro1z5qdq2o9ay

这篇关于执行 bzr commit --local、bzr pull、bzr commit 后丢失了一些代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆