【发布时间】:2010-11-29 13:11:56
【问题描述】:
我使用hg strip 从我的历史记录中删除了一些提交。
现在我想重新应用在 strip 命令期间作为备份制作的补丁:.hg/strip-backup/68a8f24f62d0-backup.hg
不幸的是,当我尝试推送补丁时,补丁似乎已损坏:
$:~/sc2$ hg init --mq
adding .hg/patches/68a8f24f62d0-backup.hg
68a8f24f62d0-backup.hg: up to 582 MB of RAM may be required to manage this file
(use 'hg revert 68a8f24f62d0-backup.hg' to cancel the pending addition)
$:~/sc2$ hg qpush
applying 68a8f24f62d0-backup.hg
patch 68a8f24f62d0-backup.hg is empty
transaction abort!
rollback completed
cleaning up working directory...done
abort: decoding near 'h91AY&SY݁��S������': 'utf8' codec can't decode byte 0xb1 in position 16: invalid start byte!
有人已经遇到过这个问题,或者可以给我建议如何应用补丁吗?如果不可能的话,我就完蛋了……
也许这是一个python问题?
我尝试了 hg unbundle 并得到了这个:
adding changesets
adding manifests
adding file changes
transaction abort!
rollback completed
abort: received file revlog group is empty
如果我做 hg pull:
pulling from 68a8f24f62d0-backup.hg
searching for changes
adding changesets
transaction abort!
rollback completed
abort: data/sc2-local.tar.i@2cad29d699f8: no node!
那么如何解决节点问题呢?
海因里希
【问题讨论】:
-
AFAIK 命令
hg unbundle用于恢复由 strip 命令创建的备份 - 请参阅hg help strip的输出。 -
对我来说,一个解决方案是从捆绑包中获取“健康”文件,然后我可以将它们再次合并到我的工作副本中。问题是我找不到获取内容的命令!
-
可能文件确实已损坏。要找到实际问题,使用
--debug选项在此文件上运行hg命令可能会很有用。如果你运行hg --debug -R <bundle-file> log会发生什么? -
捆绑包不是您可以直接操作的东西——它们不是存档文件。你
hg pull path/to/bundle使用它。
标签: python mercurial utf-8 tortoisehg