merge with stable
authorKevin Bullock <kbullock@ringworld.org>
Fri, 01 Mar 2013 10:05:37 -0600
changeset 18743 70e2a22fd66e
parent 18742 a07be8953733 (current diff)
parent 18741 605c7c94fd70 (diff)
child 18744 f2bb897713a7
merge with stable
mercurial/localrepo.py
tests/test-issue1175.t
--- a/.hgsigs	Thu Feb 28 21:58:37 2013 -0600
+++ b/.hgsigs	Fri Mar 01 10:05:37 2013 -0600
@@ -66,3 +66,4 @@
 f5fbe15ca7449f2c9a3cf817c86d0ae68b307214 0 iD8DBQBQ+yuYywK+sNU5EO8RAm9JAJoD/UciWvpGeKBcpGtZJBFJVcL/HACghDXSgQ+xQDjB+6uGrdgAQsRR1Lg=
 a6088c05e43a8aee0472ca3a4f6f8d7dd914ebbf 0 iD8DBQBRDDROywK+sNU5EO8RAh75AJ9uJCGoCWnP0Lv/+XuYs4hvUl+sAgCcD36QgAnuw8IQXrvv684BAXAnHcA=
 7511d4df752e61fe7ae4f3682e0a0008573b0402 0 iD8DBQBRFYaoywK+sNU5EO8RAuErAJoDyhXn+lptU3+AevVdwAIeNFyR2gCdHzPHyWd+JDeWCUR+pSOBi8O2ppM=
+5b7175377babacce80a6c1e12366d8032a6d4340 0 iD8DBQBRMCYgywK+sNU5EO8RAq1/AKCWKlt9ysibyQgYwoxxIOZv5J8rpwCcDSHQaaf1fFZUTnQsOePwcM2Y/Sg=
--- a/.hgtags	Thu Feb 28 21:58:37 2013 -0600
+++ b/.hgtags	Fri Mar 01 10:05:37 2013 -0600
@@ -79,3 +79,4 @@
 f5fbe15ca7449f2c9a3cf817c86d0ae68b307214 2.5-rc
 a6088c05e43a8aee0472ca3a4f6f8d7dd914ebbf 2.5
 7511d4df752e61fe7ae4f3682e0a0008573b0402 2.5.1
+5b7175377babacce80a6c1e12366d8032a6d4340 2.5.2
--- a/mercurial/localrepo.py	Thu Feb 28 21:58:37 2013 -0600
+++ b/mercurial/localrepo.py	Fri Mar 01 10:05:37 2013 -0600
@@ -705,14 +705,18 @@
 
     def setparents(self, p1, p2=nullid):
         copies = self.dirstate.setparents(p1, p2)
+        pctx = self[p1]
         if copies:
             # Adjust copy records, the dirstate cannot do it, it
             # requires access to parents manifests. Preserve them
             # only for entries added to first parent.
-            pctx = self[p1]
             for f in copies:
                 if f not in pctx and copies[f] in pctx:
                     self.dirstate.copy(copies[f], f)
+        if p2 == nullid:
+            for f, s in sorted(self.dirstate.copies().items()):
+                if f not in pctx and s not in pctx:
+                    self.dirstate.copy(None, f)
 
     def filectx(self, path, changeid=None, fileid=None):
         """changeid can be a changeset revision, node, or tag.
--- a/tests/test-issue1175.t	Thu Feb 28 21:58:37 2013 -0600
+++ b/tests/test-issue1175.t	Fri Mar 01 10:05:37 2013 -0600
@@ -31,7 +31,7 @@
   b
    b: searching for copy revision for a
    b: copy a:b80de5d138758541c5f05265ad144ab9fa86d1db
-  committed changeset 5:89e8e4be0de296fa3d6dd7825ccc44d7dc0f1f3b
+  committed changeset 5:732aafbecb501a198b3cc9323ad3899ff04ccf95
 
   $ hg verify
   checking changesets
@@ -45,8 +45,8 @@
   # User test
   # Date 0 0
   #      Thu Jan 01 00:00:00 1970 +0000
-  # Node ID 89e8e4be0de296fa3d6dd7825ccc44d7dc0f1f3b
-  # Parent  7fc86ba705e717a721dbc361bf8c9bc05a18ca2f
+  # Node ID 732aafbecb501a198b3cc9323ad3899ff04ccf95
+  # Parent  1d1625283f71954f21d14c3d44d0ad3c019c597f
   5
   
   diff --git a/b b/b
--- a/tests/test-rebase-rename.t	Thu Feb 28 21:58:37 2013 -0600
+++ b/tests/test-rebase-rename.t	Fri Mar 01 10:05:37 2013 -0600
@@ -12,20 +12,24 @@
   $ hg init a
   $ cd a
 
+  $ mkdir d
   $ echo a > a
   $ hg ci -Am A
   adding a
 
-  $ echo b > b
+  $ echo b > d/b
   $ hg ci -Am B
-  adding b
+  adding d/b
 
-  $ hg mv b b-renamed
+  $ hg mv d d-renamed
+  moving d/b to d-renamed/b
   $ hg ci -m 'rename B'
 
   $ hg up -q -C 1
 
   $ hg mv a a-renamed
+  $ echo x > d/x
+  $ hg add d/x
 
   $ hg ci -m 'rename A'
   created new head
@@ -47,6 +51,12 @@
   diff --git a/a b/a-renamed
   rename from a
   rename to a-renamed
+  diff --git a/d/x b/d/x
+  new file mode 100644
+  --- /dev/null
+  +++ b/d/x
+  @@ -0,0 +1,1 @@
+  +x
   
 Rebase the revision containing the rename:
 
@@ -70,23 +80,29 @@
   diff --git a/a b/a-renamed
   rename from a
   rename to a-renamed
+  diff --git a/d-renamed/x b/d-renamed/x
+  new file mode 100644
+  --- /dev/null
+  +++ b/d-renamed/x
+  @@ -0,0 +1,1 @@
+  +x
   
 
 Rebased revision does not contain information about b (issue3739)
 
   $ hg log -r 3 --debug
-  changeset:   3:3b905b1064f14ace3ad02353b79dd42d32981655
+  changeset:   3:032a9b75e83bff1dcfb6cbfa4ef50a704bf1b569
   tag:         tip
   phase:       draft
-  parent:      2:920a371a5635af23a26a011ca346cecd1cfcb942
+  parent:      2:220d0626d185f372d9d8f69d9c73b0811d7725f7
   parent:      -1:0000000000000000000000000000000000000000
-  manifest:    3:c4a62b2b64593c8fe0523d4c1ba2e243a8bd4dce
+  manifest:    3:035d66b27a1b06b2d12b46d41a39adb7a200c370
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  files+:      a-renamed
+  files+:      a-renamed d-renamed/x
   files-:      a
   extra:       branch=default
-  extra:       rebase_source=89af05cb38a281f891c6f5581dd027092da29166
+  extra:       rebase_source=73a3ee40125d6f0f347082e5831ceccb3f005f8a
   description:
   rename A