Try to check if .hgsub and .hgsubstate exist at all before looking
for them in every changeset to be pushed. The latter can be quite
expensive for large repositories and the existance check is almost free.
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG28f0092ec89f: exchange: add fast path for subrepo check on push
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
mercurial/exchange.py | ||
---|---|---|
532 | That seems like a very wide net to throw. Do we have a more specific way of falling back? |
mercurial/exchange.py | ||
---|---|---|
532 | The problem here is remotefilelog, which has a custom hag for .hgtags and otherwise throws a runtime error. So no, I don't think there is a more specific way without changing the implementation. |
mercurial/exchange.py | ||
---|---|---|
532 | Can't we either change the exception to be more fine-grained in remotefilelog (and still inherit from RuntimeError to not break anything) or detect a remotefilelog repo and early return? I'm really not comfortable catching this wide. |
mercurial/exchange.py | ||
---|---|---|
530 | I assume this checks if the file exists anywhere in history (since it doesn't mention a rev), to handle the case of the files being removed? (I don't see the file() function on the localrepository class, so I'm not sure what this is doing) |
I assume this checks if the file exists anywhere in history (since it doesn't mention a rev), to handle the case of the files being removed? (I don't see the file() function on the localrepository class, so I'm not sure what this is doing)