[Bug 5886] New: `hg evolve` merge conflicts do not show up when commands.status.verbose=True

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Mon May 14 17:47:18 EDT 2018


https://bz.mercurial-scm.org/show_bug.cgi?id=5886

            Bug ID: 5886
           Summary: `hg evolve` merge conflicts do not show up when
                    commands.status.verbose=True
           Product: Mercurial
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: evolution
          Assignee: bugzilla at mercurial-scm.org
          Reporter: hg at pewpew.net
                CC: mercurial-devel at mercurial-scm.org,
                    pierre-yves.david at ens-lyon.org

Created attachment 2007
  --> https://bz.mercurial-scm.org/attachment.cgi?id=2007&action=edit
Test showing the issue (passes if the issue is NOT fixed)

One can set 'status.verbose=True' in the '[commands]' section of their hgrc to
make it so that `hg status` shows more information, such as when you're in an
unresolved rebase state, including which files are currently unresolved and how
to finish the operation.  This does not occur if the user ran `hg evolve` and
got merge conflicts.

≻ hg --version
Mercurial Distributed SCM (version 4.6rc1)
(see https://mercurial-scm.org for more information)
≻ hg log -r .       
changeset:   3755:d577cef1f044
user:        Pulkit Goyal <7895pulkit at gmail.com>
date:        Sun Apr 22 20:14:42 2018 +0530
summary:     evolvecmd: add comments and new lines in content-divergence
handling logic

≻ cat test-status.t
  $ cat >> $HGRCPATH <<EOF
  > [extensions]
  > rebase =
  > EOF
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH

  $ glog() {
  >   hg log -G --template '{rev}@{branch}({phase}) {desc|firstline}\n' "$@"
  > }

  $ hg init repo
  $ cd repo
  $ echo hi > foo
  $ hg commit -qAm 'hi'
  $ echo hi2 >> foo
  $ hg commit -qm 'hi2'
  $ echo hi3 >> foo
  $ hg commit -qm 'hi3'
  $ hg update -qr .^
  $ echo hi2.5 >> foo
  $ hg commit --amend -m 'hi2 and hi2.5'
  1 new orphan changesets
  $ glog
  @  3 at default(draft) hi2 and hi2.5
  |
  | *  2 at default(draft) hi3
  | |
  | x  1 at default(draft) hi2
  |/
  o  0 at default(draft) hi


Try it with 'hg evolve'
  $ hg evolve
  move:[2] hi3
  atop:[3] hi2 and hi2.5
  merging foo
  warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
  evolve failed!
  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to
abort
  abort: unresolved merge conflicts (see hg help resolve)
  [255]
BROKEN:: This should show that the repo is in an unfinished evolve state and
list the merge conflicts, in addition to listing the commands to continue/abort
the operation.
  $ hg --config commands.status.verbose=True status
  M foo
  ? foo.orig
  $ hg resolve -l
  U foo
  $ hg evolve --abort
  evolve aborted
  working directory is now at 4705b7ecffef

Try it with 'rebase'
  $ hg rebase -r 2 -d .
  rebasing 2:85983a7b4d40 "hi3"
  merging foo
  warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
  unresolved conflicts (see hg resolve, then hg rebase --continue)
  [1]
  $ hg --config commands.status.verbose=True status
  M foo
  ? foo.orig
  # The repository is in an unfinished *rebase* state.

  # Unresolved merge conflicts:
  # 
  #     foo
  # 
  # To mark files as resolved:  hg resolve --mark FILE

  # To continue:                hg rebase --continue
  # To abort:                   hg rebase --abort

  $ hg resolve -l
  U foo
  $ hg rebase --abort
  rebase aborted


When run with ${hg_repo}/tests/run_tests.py --with-hg=${hg_repo}/hg
test-status.t, this produces the output in the test above, which is incorrect
(see the BROKEN comment).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list