[Bug 6084] New: `hg merge` can loose file renames

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug 6084] New: `hg merge` can loose file renames

mercurial-bugs-2
https://bz.mercurial-scm.org/show_bug.cgi?id=6084

            Bug ID: 6084
           Summary: `hg merge` can loose file renames
           Product: Mercurial
           Version: 4.8
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: Mercurial
          Assignee: [hidden email]
          Reporter: [hidden email]
                CC: [hidden email]

I can reproduce this by the following steps:

```
$ hg init temprepo
$ cd temprepo/
$ echo a > a
$ hg ci -Aqm 'added a'
$ echo b > b
$ hg ci -Aqm 'added b'                                              
$ echo c > c
$ hg ci -Aqm 'added c'                                              
$ hg prev
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
[1] added b
$ hg mv b d
$ hg diff
diff --git a/b b/d
rename from b
rename to d
$ hg ci -m "moved b to d"                                          
created new head
(consider using topic for lightweight branches. See 'hg help topic')
$ hg work
@  799c moved b to d
| o  62bd added c
|/
o  a1fc added b
o  a5ea added a
$ hg up 62bd
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg work
o  799c moved b to d
| @  62bd added c
|/
o  a1fc added b
o  a5ea added a
$ hg merge
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg diff
diff --git a/b b/b
deleted file mode 100644
--- a/b
+++ /dev/null
@@ -1,1 +0,0 @@
-b
diff --git a/d b/d
new file mode 100644
--- /dev/null
+++ b/d
@@ -0,0 +1,1 @@
+b
pulkit@pulkit-nix:~/repo/temprepo$ hg status
M d
R b
# The repository is in an unfinished *merge* state.

# To continue:    hg commit
# To abort:       hg merge --abort

$ hg config experimental.copytrace
$
```

As it can be seen, file rename is lost after merging.

This is a quite important issue because when using merges, we merge a user
branch into default and the moves in user branch does not come to default
branch.

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