Mercurial > hg
view tests/test-issue1438 @ 11541:ab9fa7a85dd9 stable
filelog: cmp: don't read data if hashes are identical (issue2273)
filelog.renamed() is an expensive call as it reads the filelog if p1 == nullid.
It's more efficient to first compute the hash, and to bail early if
the computed hash is the same as the stored nodeid.
'samehashes' variable is not strictly necessary, but helps for comprehension.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Mon, 05 Jul 2010 19:49:54 +0900 |
parents | 2c5b2abfb8be |
children |
line wrap: on
line source
#!/bin/sh "$TESTDIR/hghave" symlink || exit 80 rm -rf a hg init a cd a ln -s foo link hg add link hg ci -mbad link hg rm link hg ci -mok hg diff -g -r 0:1 > bad.patch hg up 0 hg import --no-commit bad.patch hg st