Mercurial > hg-stable
view tests/test-diff-issue2761.t @ 31657:d5cbbee542eb
largefiles: reuse hexsha1() to centralize hash calculation logic into it
This patch also renames argument of hexsha1(), not only for
readability ("data" isn't good name for file-like object), but also
for reviewability (including hexsha1() code helps reviewers to confirm
how these functions are similar).
BTW, copyandhash() has also similar logic, but it can't reuse
hexsha1(), because it writes read-in data into specified fileobj
simultaneously.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Mon, 27 Mar 2017 09:44:34 +0900 |
parents | 73e3e368bd42 |
children | 55c6ebd11cb9 |
line wrap: on
line source
Test issue2761 $ hg init $ touch to-be-deleted $ hg add adding to-be-deleted $ hg ci -m first $ echo a > to-be-deleted $ hg ci -m second $ rm to-be-deleted $ hg diff -r 0 Same issue, different code path $ hg up -C 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ touch does-not-exist-in-1 $ hg add adding does-not-exist-in-1 $ hg ci -m third $ rm does-not-exist-in-1 $ hg diff -r 1