开发者

Extending the history of a Mercurial repository into past

开发者 https://www.devze.com 2022-12-22 09:48 出处:网络
I\'ve started development on a project (which used CVS) by downloading its sources, creating a fresh HG repository, and using that. However, the original project now has converted to using Mercurial a

I've started development on a project (which used CVS) by downloading its sources, creating a fresh HG repository, and using that. However, the original project now has converted to using Mercurial as well. Can I add its history before my initial commit into my repository?

Alternately, how can I push my r开发者_如何转开发epository to the remote one so as to preserve the history of both?


You can't change the ancestors of your current repo without altering the hash id's of every changeset, which essentially makes it a different repo. The hash of "left-parent" and "right-parent" are part of "who a changeset is" and so giving a parent to the first parent-less changeset in your current repo would change that first changeset's hash, which since it's the parent of the second changeset would change it's hash and so on.

If you're okay with changing the hashes of your existing repo (which you shouldn't be if anyone else out in the wild has clones of it) you could use the convert extension or even just import/export to attach your repo to the their newly converted repo.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号