# HG changeset patch # User Mads Kiilerich # Date 1298552768 -3600 # Node ID 3a3584967a93b378bfdff15c5cc5040b12b7054b # Parent 091c86a77d19b6183af07263758cc1cb2534fe0f 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. diff -r 091c86a77d19 -r 3a3584967a93 mercurial/localrepo.py --- 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) diff -r 091c86a77d19 -r 3a3584967a93 tests/test-status.t --- 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