tests/test-merge2.t
author Jun Wu <quark@fb.com>
Sun, 20 Aug 2017 10:55:11 -0700
changeset 34011 1b28525e6698
parent 16913 f2719b387380
child 44177 1850066f9e36
permissions -rw-r--r--
revset: remove order information from tree (API) Keeping `order` in tree makes AST operation harder. And there could be invalid cases if trees could be generated and compounded freely, like: SetA(order=define) & SetB(order=define) ^^^^^^ couldn't be satisfied This patch changes the code to calculate order on the fly, during tree traversal. Optimization of reordering `and` arguments is preserved by introducing a new internal operation `flipand`. .. api:: revset.stringset() now takes 'order' as the last argument. Differential Revision: https://phab.mercurial-scm.org/D451

  $ hg init t
  $ cd t
  $ echo This is file a1 > a
  $ hg add a
  $ hg commit -m "commit #0"
  $ echo This is file b1 > b
  $ hg add b
  $ hg commit -m "commit #1"
  $ rm b
  $ hg update 0
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ echo This is file b2 > b
  $ hg add b
  $ hg commit -m "commit #2"
  created new head
  $ cd ..; rm -r t

  $ mkdir t
  $ cd t
  $ hg init
  $ echo This is file a1 > a
  $ hg add a
  $ hg commit -m "commit #0"
  $ echo This is file b1 > b
  $ hg add b
  $ hg commit -m "commit #1"
  $ rm b
  $ hg update 0
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ echo This is file b2 > b
  $ hg commit -A -m "commit #2"
  adding b
  created new head
  $ cd ..; rm -r t

  $ hg init t
  $ cd t
  $ echo This is file a1 > a
  $ hg add a
  $ hg commit -m "commit #0"
  $ echo This is file b1 > b
  $ hg add b
  $ hg commit -m "commit #1"
  $ rm b
  $ hg remove b
  $ hg update 0
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ echo This is file b2 > b
  $ hg commit -A -m "commit #2"
  adding b
  created new head

  $ cd ..