tests/test-merge2.t
author Phil Cohen <phillco@fb.com>
Wed, 27 Dec 2017 17:38:28 -0600
changeset 35701 c5d220a621e7
parent 16913 f2719b387380
child 44177 1850066f9e36
permissions -rw-r--r--
rebase: don't run IMM if running rebase in a transaction Some callers to rebase.rebase(), like `_moverelative` in `fbamend/movement.py`, wrap the entire rebase call in a transaction. This raises havoc when IMM tries to retry the rebase when it hits merge conflicts, because the abort will fail the whole transaction, not the subset. It also fails at the end, losing any conflict resolution, as @sid0 noticed. The right long-term fix that @quark and I have discussed is to change the restarting logic such that it doesn't abort at all, but simply switches between IMM and non-IMM fluidly for each commit, which has other nice properties. In the meantime this will do for now. Differential Revision: https://phab.mercurial-scm.org/D1782

  $ 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 ..