tests/test-evolve-bumped.t
author Laurent Charignon <lcharignon@fb.com>
Tue, 16 Jun 2015 15:14:37 -0700
changeset 1404 848a04c078c7
parent 1356 aff6bc2a6b2d
child 1416 b8a9d2e8c772
permissions -rw-r--r--
evolve: add selector for trouble types This patch adds command line flags to select the kind of troubles to solve. Before this patch evolve was solving any kind of troubled. With this patch evolve --all and evolve --rev can be configured to only solve only some type of troubles (divergent, bumped or unstable). To give this choice to the user we add three new command line flags to the evolve command: --bumped, --divergent and --unstable.

  $ hg init public
  $ cd public
  $ echo a > a
  $ hg commit -A -m init
  adding a
  $ cd ..

  $ evolvepath=$(echo $(dirname $TESTDIR))/hgext/evolve.py
  $ hg clone -U public private
  $ cd private
  $ cat >> .hg/hgrc <<EOF
  > [extensions]
  > evolve = $evolvepath
  > [phases]
  > publish = false
  > EOF
  $ cd ..

  $ cp -a private alice
  $ cp -a private bob

  $ cd alice
  $ hg update
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ echo a >> a
  $ hg commit -u alice -m 'modify a'
  $ hg push ../private
  pushing to ../private
  searching for changes
  adding changesets
  adding manifests
  adding file changes
  added 1 changesets with 1 changes to 1 files
  $ hg log -r 'draft()'
  changeset:   1:4d1169d82e47
  tag:         tip
  user:        alice
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     modify a
  

  $ cd ../bob
  $ hg pull ../private
  pulling from ../private
  searching for changes
  adding changesets
  adding manifests
  adding file changes
  added 1 changesets with 1 changes to 1 files
  (run 'hg update' to get a working copy)
  $ hg log -r 'draft()'
  changeset:   1:4d1169d82e47
  tag:         tip
  user:        alice
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     modify a
  
  $ hg push ../public
  pushing to ../public
  searching for changes
  adding changesets
  adding manifests
  adding file changes
  added 1 changesets with 1 changes to 1 files
  $ hg log -r 'draft()'

  $ cd ../alice
  $ hg amend -m 'tweak a'
  $ hg pull ../public
  pulling from ../public
  searching for changes
  no changes found
  1 new bumped changesets

  $ hg evolve -a --bumped
  recreate:[2] tweak a
  atop:[1] modify a
  computing new diff
  committed as 4d1169d82e47
  working directory is now at 4d1169d82e47