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

            Bug ID: 5816
           Summary: mq doesn't correctly block hg commit --amend on
                    mq-managed commits
           Product: Mercurial
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: mq
          Assignee: bugzi...@mercurial-scm.org
          Reporter: fah...@faheem.info
                CC: mercurial-devel@mercurial-scm.org

As mentioned in https://stackoverflow.com/q/49219477/350713 and a couple of
Mercurial mailing lists, the following script breaks MQ.

    #!/bin/sh                                                                   

hg init test
cd test
echo "This is foo" >> foo
hg add
hg ci -m "Add foo"
hg init --mq
echo "Line 2 of foo" >> foo
hg qnew p
hg ci --mq -m "Add patch p"
hg ref

Giving the following log

hg log -vG --hidden
@  changeset:   2:f7f038d3aab5
|  tag:         tip
|  parent:      0:9d3a95922194
|  user:        Faheem Mitha <fah...@faheem.info>
|  date:        Sun Mar 11 16:38:51 2018 +0530
|  files:       foo
|  description:
|  [mq]: p
|
|
| x  changeset:   1:e467a2433c7f
|/   tag:         p
|    tag:         qbase
|    tag:         qtip
|    user:        Faheem Mitha <fah...@faheem.info>
|    date:        Sun Mar 11 16:38:50 2018 +0530
|    obsolete:    rewritten using amend as 2:f7f038d3aab5 by Faheem Mitha
<fah...@faheem.info> (at 2018-03-11 16:38 +0530)
|    obsolete:    rewritten by Faheem Mitha <fah...@faheem.info> as
f7f038d3aab5 (at 2018-03-11 16:38 +0530)
|    files:       foo
|    description:
|    [mq]: p
|
|
o  changeset:   0:9d3a95922194
   tag:         qparent
   user:        Faheem Mitha <fah...@faheem.info>
   date:        Sun Mar 11 16:38:50 2018 +0530
   files:       foo
   description:
   Add foo

Additionally, Augie Fackler provided the following reproduction recipe - see
https://bitbucket.org/snippets/durin42/Le4Mrn
This recipe does not use evolve.

[augie-macbookpro2:~] augie% hg init mqbug                       [default ef14]
[augie-macbookpro2:~] augie% cd mqbug                            [default ef14]
[augie-macbookpro2:~/mqbug] augie% make-greek-tree.sh            [default 0000]
### Making a Greek Tree for import...
### Done.
[augie-macbookpro2:~/mqbug] augie% hg add                        [default 0000]
adding A/B/E/alpha
adding A/B/E/beta
adding A/B/lambda
adding A/D/G/pi
adding A/D/G/rho
adding A/D/G/tau
adding A/D/H/chi
adding A/D/H/omega
adding A/D/H/psi
adding A/D/gamma
adding A/mu
adding iota
[augie-macbookpro2:~/mqbug] augie% hg ci -m 'greek tree'         [default 0000]
[augie-macbookpro2:~/mqbug] augie% echo foo >> iota              [default 934e]
[augie-macbookpro2:~/mqbug] augie% hg qnew --force iota          [default 934e]
[augie-macbookpro2:~/mqbug] augie% echo foo >> iota              [default 7b80]
[augie-macbookpro2:~/mqbug] augie% hg ci --amend                 [default 7b80]

[augie-macbookpro2:~/mqbug] augie% hg qser                       [default 0930]
iota
[augie-macbookpro2:~/mqbug] augie% hg log                        [default 0930]
changeset:   2:09300d122196
tag:         tip
parent:      0:934ee418e81d
user:        Augie Fackler <r...@durin42.com>
date:        Mon Mar 12 11:17:20 2018 -0400
summary:     [mq]: iota

changeset:   0:934ee418e81d
tag:         qparent
user:        Augie Fackler <r...@durin42.com>
date:        Mon Mar 12 11:17:12 2018 -0400
summary:     greek tree

where make-greek-tree.sh is at
https://bitbucket.org/durin42/dotfiles/src/tip/unixSoft/bin/make-greek-tree.sh

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to