的目标:创建一个新的存储库,而不需要占用1.27GB的不必要文件
解决方案:使用hg转换和排除文件
问题:文件没有被排除在外
Filemap.txt content:
exclude "feturehub/wp-content/uploads/backupbuddy_backups"
exclude "feturehub/wp-content/uploads/edd/2015"命令
hg convert --filemap filemap.txt featurehub featurehubclean从功能中心( src )的父文件夹运行,src还包含filemap.txt。
我得到的是一个只有.hg文件夹的文件夹,而其中是我试图排除的edd文件夹(如果edd或它的‘2015子文件夹被排除在外,2015年是edd文件夹中唯一的东西)。
编辑:删除了filemap.txt中的第三行,因为它不会影响结果,但确实会引起混淆。
Edit2:
// fe is my source root, no there's no hg repo here, and each folder IS
// a project with an hg repo, featurehub is one such project/repo
AndrijaMBA:fe ajambrovic$ ls | grep file
filemap.txt
AndrijaMBA:fe ajambrovic$ hg convert --filemap filemap.txt featurehub featurehubclean
initializing destination featurehubclean repository
scanning source...
sorting...
converting...
.....在运行该命令之后,新的repo --功能包--包含edd文件夹(以及它的子文件夹)。
发布于 2016-03-23 11:25:37
好的,问题是琐碎的路径。而不是:
exclude "feturehub/wp-content/uploads/backupbuddy_backups"
exclude "feturehub/wp-content/uploads/edd/2015"我应该用
exclude "wp-content/uploads/backupbuddy_backups"
exclude "wp-content/uploads/edd/2015"这里的示例:https://confluence.atlassian.com/bitbucket/reduce-repository-size-321848262.html展示了使用(在本例中)“特性集线器”,尽管扩展文档声明:
所有路径都应指定为根植于转换目录的相对路径。无论操作系统如何,都应该使用Unix路径语法。
https://stackoverflow.com/questions/36135058
复制相似问题