- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在大型存储库上,hg status
可能非常慢,如果我们想在 shell 提示符中显示存储库的状态,这可能是个问题。
这是 hg --profile status
的结果:
CallCount Recursive Total(s) Inline(s) module:lineno(function)
7682 0 0.3287 0.3287 <mercurial.osutil.listdir>
63067 0 0.2052 0.2052 <method 'match' of '_sre.SRE_Pattern' objects>
1 0 0.7164 0.0735 mercurial.dirstate:999(traverse)
2 0 0.8105 0.0496 mercurial.dirstate:1102(status)
139 0 0.0420 0.0420 <zlib.decompress>
62501 0 0.1137 0.0339 mercurial.dirstate:617(_normalizefile)
12 0 0.0307 0.0307 <method 'read' of 'file' objects>
63760 0 0.0283 0.0283 <method 'get' of 'dict' objects>
1 0 0.0217 0.0217 <mercurial.parsers.make_file_foldmap>
376 0 0.0508 0.0202 mercurial.manifest:468(walk)
70079 0 0.0327 0.0170 mercurial.posix:241(normcase)
1 0 0.0167 0.0167 mercurial.dirstate:200(_dirs)
70079 0 0.0156 0.0156 <mercurial.parsers.asciilower>
2 0 0.0137 0.0137 <mercurial.parsers.parse_dirstate>
62875 0 0.2166 0.0116 mercurial.match:177(__call__)
4 0 0.0113 0.0113 <method 'update' of '_hashlib.HASH' objects>
1 0 0.0107 0.0106 mercurial.manifest:451(_dirs)
105 75 0.0132 0.0081 <__import__>
2 0 0.7559 0.0069 mercurial.dirstate:940(walk)
2 0 0.0062 0.0062 <mercurial.mpatch.patches>
724 678 0.0188 0.0061 sre_parse:395(_parse)
1198 1152 0.0094 0.0056 sre_compile:64(_compile)
3866 0 0.0043 0.0040 re:208(escape)
6227 0 0.0044 0.0036 sre_parse:193(__next)
1 0 0.0767 0.0028 mercurial.manifest:1307(read)
1431 1152 0.0032 0.0026 sre_parse:151(getwidth)
1 0 0.0219 0.0026 mercurial.dirstate:167(_dirfoldmap)
30130 0 0.0024 0.0024 <method 'append' of 'list' objects>
1 0 0.0022 0.0022 mercurial.manifest:407(__init__)
7573 0 0.0036 0.0022 sre_parse:141(__getitem__)
我已经找到了针对 hg branch
( see here for more details ) 的优化,但是我找不到针对 hg status
的优化。
你知道一些魔术来改善它吗?我不需要知道哪些文件脏或不脏的详细信息,我只需要知道存储库是否干净,这样我就可以显示干净或红色提示。
谢谢!
最佳答案
您尝试过 FsMonitor 吗?扩展?
维基页面的描述:
Integrates the file-monitoring program Watchman with Mercurial to produce faster status results.
On a particular Linux system, for a real-world repository with over 400,000 files hosted on ext4, vanilla hg status takes 1.3 seconds. On the same system, with fsmonitor it takes about 0.3 seconds.
关于shell - 了解 mercurial repo 状态的最快方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40452486/
采用这个 repo 结构: Server (main repo) ProjectA (subrepo) SharedLibrary (subrepo) Client (main rep
我们正在尝试使用 https://grails.org/plugin/jms用于 jms 集成。但我们无法解决它。 环顾四周,我能够验证它是否存在于这个 repo 中: http://repo.gra
是否可以在现有的 Mercurial 存储库中创建 Mercurial 存储库? 这个想法是将存储库的子目录作为不同的存储库进行处理,你是如何做到的? 我不是在谈论子存储库(至少,如果我理解子存储库的
这个问题在这里已经有了答案: How do I work with a git repository within another repository? (5 个答案) 关闭 6 年前。 我想克隆
我在尝试让 ssh 在 GIT 中工作时犯了一个灾难性的错误。 我实际上将错误的 url 从服务器复制到该存储库的配置文件中。因此,我放入配置文件的 url 是一个不同但名称相似的 repo。 现在,
我们在 github 上有数百个不再使用的存档库。 默认情况下,Github 上没有 stash 存档仓库的选项。目前,通过 active repos 是不友好的,尤其是在 github 上大量滚动。
在 .repo文件: [centos] name=centos7.2 baseurl=http://10.0.0.1/centos7.2/7.2/xxx/x86_64/ enabled=
一位同事使用 repo start 创建了功能分支 thebranch。现在我想检查这个分支并对其进行处理。我试试这个: repo init -u git@gitserver:manifest.git
我在github上托管了一个项目,结构如下 github.com/example/allpackages . ├── .git └── packages ├── example-1 ├
我在github上托管了一个项目,结构如下 github.com/example/allpackages . ├── .git └── packages ├── example-1 ├
我们可以使用 hg in -vp 将我们的本地仓库与主仓库进行比较。 如何在视觉上做到这一点?我们使用 ExamDiff extension作为我们的 Mercurial 视觉差异工具。我们认为有一种
我有一个 repo 镜像服务器 (myrepo),最初创建它是为了镜像和与远程同步(repoA)。也就是说,我使用了类似下面的东西来创建它。 cd myrepo repo init -u git://
我镜像了https://github.com/boostorg/boost.git使用命令到我自己的存储库: git clone --recursive https://github.com/boos
来自 Viewing Unpushed Git Commits我知道如何区分我自己的 repo 和本地提交: git diff origin/master..HEAD 但是,我怎样才能使用 path/
我已将我的应用程序源 (git repo) 存储在文件夹中: MyProject/front_app 但在 GitHub 上,我希望将存储库命名为 front_app 而不是 my_project_f
我有一个 repo1和 repo2在本地机器上。它们非常相似,但后者是某种其他分支(不再维护 repo1)。 /path/to/repo1 $ git log HEAD~5..HEAD~4 Add:
我在 Mac OS X (10.7.3)、x64 Intel 上更新我的 Android 源代码树时遇到问题。代码是根据 Downloading the Source Tree 安装的, 并且 SE
我有两个位于不同服务器上的存储库,分别称为 repo-1 和 repo-2。 开始两个“树干”是平等的: repo-1/trunk == repo-2/trunk 与此同时,正在向 repo-1/tr
我大约在 6 个月前加入,当我到达时,我的团队没有使用任何形式的版本控制。我已经说服 mgmt 在新项目中使用 Mercurial,所以我们在我们的网络服务器上有以下结构: -MainFolder (
我正在尝试从包含通常结构(分支、标签和主干)的 repoA 迁移到仅在主干中具有子文件夹的现有 RepoB,该 RepoB 在分支、标签和主干中具有项目和代码。 我有一个通过代码创建的转储文件: sv
我是一名优秀的程序员,十分优秀!