Submitter | phabricator |
---|---|
Date | April 11, 2018, 9:24 p.m. |
Message ID | <differential-rev-PHID-DREV-a23gcohmngf2qklk5ul7-req@phab.mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/30744/ |
State | Superseded |
Headers | show |
Comments
yuja added inline comments. INLINE COMMENTS > test-fix.t:495 > adding foo.whole > - $ OLD_MTIME=`stat -c %Y foo.whole` > - $ sleep 1 # mtime has a resolution of one second. > + $ cp foo.whole foo.whole.orig > + $ sleep 2 # mtime has a resolution of one or two seconds. Maybe `cp -p` to not increment a few microseconds? > test-fix.t:499 > + $ f foo.whole --newer foo.whole.orig > + foo.whole: older than foo.whole.orig > This means `mtime(foo.whole) < mtime(foo.whole.orig)`, but we need to assert `mtime(foo.whole.orig) >= mtime(foo.whole)`. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3252 To: durin42, #hg-reviewers, indygreg Cc: yuja, mercurial-devel
Patch
diff --git a/tests/test-fix.t b/tests/test-fix.t --- a/tests/test-fix.t +++ b/tests/test-fix.t @@ -492,11 +492,11 @@ $ printf "NO FIX NEEDED\n" > foo.whole $ hg add adding foo.whole - $ OLD_MTIME=`stat -c %Y foo.whole` - $ sleep 1 # mtime has a resolution of one second. + $ cp foo.whole foo.whole.orig + $ sleep 2 # mtime has a resolution of one or two seconds. $ hg fix --working-dir - $ NEW_MTIME=`stat -c %Y foo.whole` - $ test $OLD_MTIME = $NEW_MTIME + $ f foo.whole --newer foo.whole.orig + foo.whole: older than foo.whole.orig $ cd ..