Mercurial > hg
changeset 14150:3a3584967a93
status: remove unreachable code for status between revisions
The manifest value of a file will never be false when "not parentworking", and
the expensive content comparision would thus fortunately never be reached. (If
it was reached it would be wrong for example in case of renames.)
This code once handled status against working directory, but that has been done
elsewhere for a long time.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 24 Feb 2011 14:06:08 +0100 |
parents | 091c86a77d19 |
children | 1fe82c93b8e2 |
files | mercurial/localrepo.py tests/test-status.t |
diffstat | 2 files changed, 28 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Mar 07 14:47:30 2011 +0100 +++ b/mercurial/localrepo.py Thu Feb 24 14:06:08 2011 +0100 @@ -1228,8 +1228,7 @@ if fn in mf1: if (fn not in deleted and (mf1.flags(fn) != mf2.flags(fn) or - (mf1[fn] != mf2[fn] and - (mf2[fn] or ctx1[fn].cmp(ctx2[fn]))))): + mf1[fn] != mf2[fn])): modified.append(fn) elif listclean: clean.append(fn)
--- a/tests/test-status.t Mon Mar 07 14:47:30 2011 +0100 +++ b/tests/test-status.t Thu Feb 24 14:06:08 2011 +0100 @@ -272,3 +272,30 @@ modified R removed C deleted + +hg status between revisions: + + $ echo c1 > f1 + $ hg ci -Amm f1 + $ echo c2 > f1 + $ echo c1 > f2 + $ hg ci -Amm f1 f2 + $ echo c1 > f1 + $ hg st --rev -1:. + M f1 + $ hg st --rev -2:. + M f1 + A f2 + $ hg ci -Amm f1 + $ hg st --rev -1:-3 + M f1 + R f2 + $ hg st --rev -3:-1 + M f1 + A f2 + $ hg diff --rev -3:-1 + diff -r c861ab34bf5f -r 168d05852219 f2 + --- /dev/null Thu Jan 01 00:00:00 1970 +0000 + +++ b/f2 Thu Jan 01 00:00:00 1970 +0000 + @@ -0,0 +1,1 @@ + +c1