Mercurial 错误 255 - 如何恢复我的存储库?
这是一个关于水银的问题。
我不是一个 UNIX 爱好者,但在 Mac 上进行开发时使用了 Mercurial 和 MacHG。昨天我不得不更换我的 mac,我刚刚在新 mac 上复制了我的项目文件夹和存储库,但现在我无法在 Mercurial 中对其执行任何操作。我可以在 xcode 中打开项目,一切都很好,但是如果我尝试通过终端在 Mercurial 中执行任何操作,我会得到以下信息: abort: data/.DS_Store.i@e959df7694ce: no node!
如果我尝试在 MacHG 中执行任何操作,但我收到 Mercurial 报告的错误号 255: 跳过不可读的忽略文件“/Users/zakhar/.hgignore”:没有这样的文件或目录 中止:data/.DS_Store.i@e959df7694ce:没有节点!
我能做什么?我在哪里可以获得这个 .hgignore 文件?我不再有旧的 Mac 了。
it's a quesion about mercurial.
I'm not a unix - guy, but use a mercurial together with MacHG for my development on Mac. Yesterday I had to change my mac, I just copied my project folder with repository on new mac, but now I can't do anything with it in mercurial. I can open project in xcode and everuthing is fine, but if I try to do anything in mercurial via terminal I'm getting this: abort: data/.DS_Store.i@e959df7694ce: no node!
If I try to do anything in MacHG I'm getting Mercurial reported error number 255:
skipping unreadable ignore file '/Users/zakhar/.hgignore': No such file or directory
abort: data/.DS_Store.i@e959df7694ce: no node!
What can I do? where can I get this .hgignore file? I don't have old mac any more.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您获得的有关将
.DS_Store
放入.hgignore
文件中的建议是您首次设置该存储库时需要的建议,但现在没有帮助。您已在旧计算机上的存储库中添加了.DS_Store
文件,并且添加文件会覆盖.hgignore
。此外,看起来当您将旧计算机中的内容复制到新计算机时,
.hg/data/.DS_Store.i
文件以及可能带有.DS_Store
的其他内容其中没有复制过来。转到新计算机上的终端并执行
hg verify
。如果您收到有关丢失文件的通知(看起来您会收到),那么您需要重新复制存储库,或者最好使用hg clone
克隆它。The advice you're getting about putting
.DS_Store
in your.hgignore
file was the advice you needed back when you first setup that repo, however it wont help now. You've already added the.DS_Store
files in your repo on your old computer and adding a file overrides.hgignore
.Furthermore, it looks like when you copied the stuff from your old computer to the new computer the
.hg/data/.DS_Store.i
file and probably anything else with.DS_Store
in it didn't copy over.Drop to terminal on the new computer and do a
hg verify
. If you get notifications about missing files (and it looks like you will) then you need to re-copy the repository over, or better yet clone it over withhg clone
..hgignore 文件告诉 Mercurial 要忽略哪些文件。
只需在提到的位置创建一个 .hgignore 文件并添加以下内容
即可:https://stackoverflow.com/questions/3714820/mercurial-script-plugin-for-ignore-remove-binary-files/3714858#3714858
此外,您可能希望删除您的文件中的所有 .DS_Store 文件回购协议:
.hgignore file tells Mercurial, what files to ignore.
Just create a .hgignore file at location mentioned and add the following
See : https://stackoverflow.com/questions/3714820/mercurial-script-plugin-for-ignore-remove-binary-files/3714858#3714858
Also you may want to remove all .DS_Store files in your repo: