[Bug 5382] New: histedit corrupts repository

bugzilla at mercurial-scm.org bugzilla at mercurial-scm.org
Tue Sep 27 11:26:18 EDT 2016


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

            Bug ID: 5382
           Summary: histedit corrupts repository
           Product: Mercurial
           Version: 3.9
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: histedit
          Assignee: bugzilla at selenic.com
          Reporter: cowwoc at bbs.darktech.org
                CC: mercurial-devel at selenic.com

Here is a testcase that is 100% reproducible for corrupting a repository using
histedit.

1. hg init test
2. cd test
3. echo commit1 > file.txt
4. hg add file.txt
5. hg commit -m "commit1"
6. echo commit2 > file.txt
7. hg commit -m "commit2"
8. hg update 0
9. echo commit3 > file.txt
10. hg commit -m "commit3"
11. echo commit4 > file.txt
12. hg commit -m "commit4"
13. echo [hooks] > .hg/hgrc
14. echo commit.jenkins = fail >> .hg/hgrc
15. echo incoming.jenkins = fail >> .hg/hgrc
16. echo changegroup.scm = python:fail >> .hg/hgrc
17. echo pretxnchangegroup.scm = python:fail >> .hg/hgrc
18. hg log -G

19. hg histedit 2

... change the first line from "pick" to "edit", save and quit

20. hg branch newbranch
21. hg commit -m "commit5"
22. hg histedit --continue
23. hg histedit --abort
24. hg log -G

Step 18 returns:

--------------------
@  changeset:   3:acd042300874
|  tag:         tip
|  user:        cowwoc at bbs.darktech.org
|  date:        Tue Sep 27 11:22:33 2016 -0400
|  summary:     commit4
|
o  changeset:   2:6cd4bf5a3e25
|  parent:      0:7f1fbf9d8623
|  user:        cowwoc at bbs.darktech.org
|  date:        Tue Sep 27 11:22:33 2016 -0400
|  summary:     commit3
|
| o  changeset:   1:5cf7adbb92ea
|/   user:        cowwoc at bbs.darktech.org
|    date:        Tue Sep 27 11:22:32 2016 -0400
|    summary:     commit2
|
o  changeset:   0:7f1fbf9d8623
   user:        cowwoc at bbs.darktech.org
   date:        Tue Sep 27 11:22:32 2016 -0400
   summary:     commit1
--------------------

Step 24 returns:

--------------------
warning: ignoring unknown working parent 0235931f44a2!
o  changeset:   1:5cf7adbb92ea
|  tag:         tip
|  user:        Gili Tzabari <gili.tzabari at gmail.com>
|  date:        Tue Sep 27 11:22:32 2016 -0400
|  summary:     commit2
|
o  changeset:   0:7f1fbf9d8623
   user:        Gili Tzabari <gili.tzabari at gmail.com>
   date:        Tue Sep 27 11:22:32 2016 -0400
   summary:     commit1
--------------------

I am expecting both steps to return the same graph.

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


More information about the Mercurial-devel mailing list