取消提交直到合并之前
当我的历史记录
-rev 100 时,合并
-- 修订版 95.3
-- 修订版 95.2
-- 修订版 95.1
-修订版 99
-rev 98
我尝试 bzr uncommit -r 95.3..
它会写入一条错误消息。我该如何解决这个问题?
错误是
bzr: ERROR: exceptions.TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
return run_bzr(argv)
File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
ret = run(*run_argv)
File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
return self.run(**all_cmd_args)
File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 3694, in run
local=local)
File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 3717, in _run
revno = revision[0].in_history(b).revno + 1
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
bzr 1.5 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'uncommit', '-r', '11955.2.32..']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'pl_PL.UTF-8'
plugins:
bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.5.0]
gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.94.0]
interactive /home/adi/.bazaar/plugins/interactive [1.2.0]
launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
rebase /home/adi/.bazaar/plugins/rebase [0.3.0]
*** Bazaar has encountered an internal error.
Please report a bug at https://bugs.launchpad.net/bzr/+filebug
including this traceback, and a description of what you
were doing when the error occurred.
When I have a history
-rev 100, merge
-- rev 95.3
-- rev 95.2
-- rev 95.1
-rev 99
-rev 98
and I try bzr uncommit -r 95.3..
it writes an error message. How can I fix the problem?
Error is
bzr: ERROR: exceptions.TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
return run_bzr(argv)
File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
ret = run(*run_argv)
File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
return self.run(**all_cmd_args)
File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 3694, in run
local=local)
File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 3717, in _run
revno = revision[0].in_history(b).revno + 1
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
bzr 1.5 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'uncommit', '-r', '11955.2.32..']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'pl_PL.UTF-8'
plugins:
bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.5.0]
gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.94.0]
interactive /home/adi/.bazaar/plugins/interactive [1.2.0]
launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
rebase /home/adi/.bazaar/plugins/rebase [0.3.0]
*** Bazaar has encountered an internal error.
Please report a bug at https://bugs.launchpad.net/bzr/+filebug
including this traceback, and a description of what you
were doing when the error occurred.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这实际上只是一个猜测,但我怀疑修订规范不接受 95.3 作为修订版。
合并将作为修订版 100 提交到您的分支,因此您应该能够执行以下操作:
或:
如果您想合并更改 95.1 和 95.2(原始合并的一部分),您可能必须执行以下操作:
或类似的事情。
如果您需要参考 95.3,我建议您阅读Bazaar 修订规范文档 看看是否有帮助。您可能需要更明确的修订号,例如
revno:95.3
(这可能不起作用)或revno:97:/path/to/merge/source
(这可能有效)。不过大部分都是猜测……This is really just a guess, but I suspect that the revision spec isn't accepting 95.3 as a revision.
The merge will have been committed to your branch as revision 100, so you should be able to just do:
or:
If you want to merge in changes 95.1 and 95.2 (part of the original merge), you will probably have to do:
or something like that.
If you need to refer to the 95.3, I'd recommend having a read of the Bazaar revision spec documentation to see if that helps. You may need a more explicit revision number such as
revno:95.3
(which probably won't work) orrevno:97:/path/to/merge/source
(which might work). Most of that was a guess though...您无法取消对像 95.1.3 这样的带点修订版的承诺,因为该修订版不在您的主线历史记录中。您可以使用
pull
命令来使树达到所需的修订版:uncommit
和pull
之间的主要区别是:uncommit
code> 在修订后留下您在工作树中取消提交的更改,而pull
只是用指定修订的文件覆盖您的工作树。此外,如果您需要在合并之前取消提交状态,则如果 r100 是分支中的最后一个修订版,则需要使用
bzr uncommit
而不指定修订版。You can't uncommit to dotted revision like 95.1.3, because this revision is not in your mainline history. You can use
pull
command instead to get your tree to desired revision:The main difference between
uncommit
andpull
is:uncommit
leaves changes after revision to which you uncommit in the working tree, whilepull
simply overwrite your working tree with files of specified revision.Also if you need to uncommit to the state just before merge you need to use
bzr uncommit
without specifying revisions if r100 is the last revision in the branch.