sta*_*tti 34 version-control mercurial dvcs
我刚刚创建了一个由其他回购的异构生态系统创建的mercurial repo.在我将它发布给我的同事之前,我想尽可能地清理它.为此,我想从历史中删除一些大的旧文件(假装它们从未存在过),因此repo会更小.
mercurial这可能吗?
Mar*_*nen 35
查看convert扩展名,尤其是--filemap选项.
通过添加以下内容启用mercurial.ini:
[extensions]
convert =
Run Code Online (Sandbox Code Playgroud)
创建要排除的文件映射:
exclude path/to/file1
exclude path/to/file2
Run Code Online (Sandbox Code Playgroud)
然后转换回购:
hg convert srcrepo destrepo --filemap <map>
Run Code Online (Sandbox Code Playgroud)
请注意,Mercurial 2.1.1中存在一个错误,导致上述命令出错:
initializing destination destrepo repository
abort: invalid mode ('r') or filename
Run Code Online (Sandbox Code Playgroud)
只需添加--splicemap <nonexistent file>选项即可解决问题.
| 归档时间: |
|
| 查看次数: |
4052 次 |
| 最近记录: |