Patchwork [Bug,5403] New: uncommit loses copy information

login
register
mail settings
Submitter bugzilla@mercurial-scm.org
Date Oct. 10, 2016, 8:41 p.m.
Message ID <bug-5403-285@https.bz.mercurial-scm.org/>
Download mbox | patch
Permalink /patch/17028/
State Not Applicable
Headers show

Comments

bugzilla@mercurial-scm.org - Oct. 10, 2016, 8:41 p.m.
https://bz.mercurial-scm.org/show_bug.cgi?id=5403

            Bug ID: 5403
           Summary: uncommit loses copy information
           Product: Mercurial
           Version: 3.9
          Hardware: PC
                OS: Mac OS
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: evolution
          Assignee: bugzilla@selenic.com
          Reporter: martinvonz@google.com
                CC: mercurial-devel@selenic.com,
                    pierre-yves.david@ens-lyon.org

The following creates a commit with a copy and one other change. It then
uncommits the other change. The copy then incorrectly becomes a plain addition.
(Sorry, it's not quite in .t test file format)

$ hg init
$ echo a > a
$ hg add a
$ hg ci -m 1
$ hg cp a b
$ echo c > c
$ hg add c
$ hg ci -m 2
$ hg export --git
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1476146053 25200
#      Mon Oct 10 17:34:13 2016 -0700
# Node ID 0295dd7e65b03c601ce745c2ebcee751ea6000ad
# Parent  fb3258d098dfc125b88779f7ff18c39daf8a01e4
2

Patch

diff --git a/a b/b
copy from a
copy to b
diff --git a/c b/c
new file mode 100644
--- /dev/null
+++ b/c
@@ -0,0 +1,1 @@ 
+c
$ hg uncommit c
$ hg export --git
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1476146053 25200
#      Mon Oct 10 17:34:13 2016 -0700
# Node ID 56df44fbe5c202aeed0a39043a7dc7cccba0159a
# Parent  fb3258d098dfc125b88779f7ff18c39daf8a01e4
2

diff --git a/b b/b
new file mode 100644
--- /dev/null
+++ b/b
@@ -0,0 +1,1 @@ 
+a