tests/test-revert-flags.t
author Manuel Jacob <me@manueljacob.de>
Thu, 15 Sep 2022 01:48:38 +0200
changeset 49494 c96ed4029fda
parent 22046 7a9cbb315d84
permissions -rw-r--r--
templates: add filter to reverse list The filter supports only lists because for lists, it’s straightforward to implement. Reversing text doesn’t seem very useful and is hard to implement. Reversing the bytes would break multi-bytes encodings. Reversing the code points would break characters consisting of multiple code points. Reversing graphemes is non-trivial without using a library not included in the standard library.

#require execbit

  $ 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

  $ cd ..