tests/test-revert-flags.t
author Patrick Mezard <patrick@mezard.eu>
Mon, 30 Apr 2012 20:45:45 +0200
branchstable
changeset 16553 9224cc2e99cc
parent 12110 58a8105242a5
child 16913 f2719b387380
permissions -rw-r--r--
amend: fix copy records handling (issue3410) Messing with the dirstate before the intermediate commit seems error prone. Instead, commit and recompute the copies with copies.pathcopies(), then use that with commitctx(). Since copies.pathcopies() does not support file replacement very well, the whole .renamed() condition in samefile() is removed and the "file replacement caused by differing copy source" effect is discarded. Test shamelessly stolen from Idan Kamara <idankk86@gmail.com>

  $ "$TESTDIR/hghave" execbit || exit 80

  $ hg init repo
  $ cd repo
  $ echo foo > foo
  $ chmod 644 foo
  $ hg ci -qAm '644'

  $ chmod 755 foo
  $ hg ci -qAm '755'

reverting to rev 0

  $ hg revert -a -r 0
  reverting foo
  $ hg st
  M foo
  $ hg diff --git
  diff --git a/foo b/foo
  old mode 100755
  new mode 100644