[Bug 4251] New: histedit folding commits results in conflict
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Fri May 16 06:10:45 CDT 2014
http://bz.selenic.com/show_bug.cgi?id=4251
Priority: normal
Bug ID: 4251
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: histedit folding commits results in conflict
Severity: bug
Classification: Unclassified
OS: Windows
Reporter: cvmocanu at gmail.com
Hardware: PC
Status: UNCONFIRMED
Version: 3.0
Component: histedit
Product: Mercurial
Folding commits with the histedit extension results in conflict.
Here is the test case:
1) Initialize an new repo:
> $ hg init
2) Create a file:
> $ mkdir initial-dir ; echo foo > initial-dir/initial-file ; hg add initial-dir/initial-file ; hg commit -m "initial commit"
3) Move the file to a new directory, and in the same commit, change its
content:
> $ mkdir another-dir ; hg mv initial-dir/initial-file another-dir/ ; echo changed > another-dir/initial-file ; hg commit -m "moved and changed"
4) Rename the file:
$ hg mv another-dir/initial-file another-dir/renamed-file ; hg commit -m
"renamed"
5) Now, let's try to fold the second commit into the first:
> $ hg histedit --rev "draft()"
Choosing to fold in the editor:
> pick 6ed6458efaa6 0 initial commit
> fold 652030fdfb10 1 moved and changed
> pick 13e1a480f2a7 2 renamed
histedit outputs this:
> 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
> adding another-dir\initial-file
> removing initial-dir\initial-file
> 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
> 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
> local changed another-dir/initial-file which remote deleted
> use (c)hanged version or (d)elete?
I assume the conflict arises when it tries to apply the third commit.
The expected behavior is so have the file in the same state as if I had 3
commits (before the fold), namely:
- the content of the file should be "changed"
- the name of the file should be "another-dir/renamed-file"
And of course, I don't expect conflicts, since folding 2 commits means by
definition: create one commit which is performs the same changes as the folded
commits - so I don't see any possibility for conflicts.
hg version outputs:
> Mercurial Distributed SCM (version 3.0+3)
I'm using Windows 8.1 64bit.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list