简体   繁体   English

忽略HG pull上的某些文件

[英]ignore certain files on HG pull

Thanks for reading my situation.. 感谢您阅读我的情况。

My situation is this: RepoA (7GB) - I have read access RepoB (7GB - Forked from RepoA) - I have read/write access, but no admin access, and cannot fork. 我的情况是这样的:RepoA(7GB)-我具有读访问权限RepoB(7GB-从RepoA派生)-我具有读/写访问权限,但没有管理员访问权限,并且无法派生。

I did not set up any of these, but am now the admin of the source code. 我没有设置任何这些,但是现在是源代码的管理员。

Currently a company is doing work in RepoA and we are pulling local and pushing into RepoB where we are also doing work.. This works great, but the repositories are so large it is very annoying. 目前,有一家公司正在RepoA中工作,我们正在拉本地,并在我们也正在工作的RepoB中进行推广。这很好,但是存储库太大,非常令人讨厌。

RepoA has some stuff, RepoB as everything RepoA有一些东西,RepoB就是一切

I created RepoC, which is a clone of B minus all of the gigs of assets. 我创建了RepoC,它是B减去所有资产的副本。 RepoC - cloned from RepoB with hg convert --filemap map.txt RepoB small_clone/RepoC RepoC-使用hg convert --filemap map.txt RepoB small_clone / RepoC从RepoB克隆

I now have a very nice manageable 300 MB repository in RepoC (Good). 现在,我在RepoC中有一个非常易于管理的300 MB存储库(良好)。 Now RepoB is useless to me. 现在,RepoB对我毫无用处。

However when someone makes a change in RepoA, I want that change in RepoC. 但是,当有人在RepoA中进行更改时,我希望在RepoC中进行更改。 In the past I have had RepoA in my hgrc, and simply done a hg pull RepoA. 过去,我在hgrc中使用了RepoA,只是简单地做了一个hg pull RepoA。 But when I do that now from the small repo (RepoC), it brings in all the assets I specified I did not want in RepoC. 但是,当我现在从小型仓库(RepoC)进行此操作时,它会带入我指定的我不想在RepoC中使用的所有资产。

Is there a way I can continue to take updates from RepoA that ignore certain directories? 有没有办法我可以继续从RepoA进行更新而忽略某些目录? Or is there a way after I hg pull from RepoA, that I can prune out any new files I do not want prior to pushing to RepoC. 或者,从hpo从RepoA中拉出后,有什么方法可以在推送到RepoC之前修剪掉不需要的任何新文件。 I have not done an HG update, but the gigs of files are showing up in .hg/store/data. 我尚未进行HG更新,但是文件的演出出现在.hg / store / data中。 I am wondering if I can somehow yank them out of there, then hg update, then commit, then push 我想知道我是否可以以某种方式将其拖出,然后进行hg更新,然后提交,然后推送

Any advice? 有什么建议吗?

Thank you! 谢谢!

There is no direct way - mercurial requires to know the complete history, and that includes all the big assets (there's no shallow clone (yet)). 没有直接的方法-Mercury需要知道完整的历史,并且包括所有的大资产(还没有浅表的克隆)。

However you might consider to use some of the extensions which make it easier to deal with huge files or many sub projects: 但是,您可能会考虑使用一些扩展名,这些扩展名使得处理大型文件或许多子项目更加容易:

If these changes to the workflow don't see the right approach (they all have their rough edges - check them carefully), you can only export the patches and import them into the other repository, either manually or even scripted; 如果对工作流程的这些更改没有找到正确的方法(它们都有其粗糙的边缘,请仔细检查),您只能手动或脚本导出导出补丁并将其导入到其他存储库中; within repoC something like hg export -rXXX -R path/to/repoB | patch 在仓库内,例如hg export -rXXX -R path/to/repoB | patch hg export -rXXX -R path/to/repoB | patch might do the trick - but for each revision. hg export -rXXX -R path/to/repoB | patch可能会解决问题-但对于每个修订版。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM