diff tests/test-pick.t @ 6553:50f55918b417

pick: update commit message hashes like other rewrite commands Maybe it would be better to use `evolvecmd._relocate()`, which does this already, but I don't know what subtle behavior changes that would trigger. Also, there are other commands (like `metaedit`) that use `rewriteutil.rewrite` instead, and so don't refresh their hashes either. We probably need a better way to track all of this, but I'm not sure how.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 12 Sep 2023 11:45:49 -0400
parents b4e1d34ad1e9
children 81fe0a498447
line wrap: on
line diff
--- a/tests/test-pick.t	Tue Jun 20 12:30:24 2023 -0300
+++ b/tests/test-pick.t	Tue Sep 12 11:45:49 2023 -0400
@@ -380,6 +380,41 @@
 
   $ hg phase -r .
   13: secret
+
+Pick rewrites node hashes in commit description
+
+  $ echo 'hg pick rewrites hashes 1' > l
+  $ hg ci -m '1705aa17bfed is my parent'
+  $ echo 'hg pick rewrites hashes 2' > l
+  $ hg ci -m 'f9ed1703aa00 is my parent'
+
+  $ hg glog -r .^^::
+  @  15:e3cb66090723 f9ed1703aa00 is my parent
+  |
+  o  14:f9ed1703aa00 1705aa17bfed is my parent
+  |
+  o  13:1705aa17bfed added l
+  |
+  ~
+
+  $ hg up -q c437988de89f
+  $ hg pick 13
+  picking 13:1705aa17bfed "added l"
+  2 new orphan changesets
+  $ hg pick 14
+  picking 14:f9ed1703aa00 "1705aa17bfed is my parent"
+  $ hg pick 15
+  picking 15:e3cb66090723 "f9ed1703aa00 is my parent"
+
+  $ hg glog -r .^^::
+  @  18:5825531d1322 7a6997f82fbe is my parent
+  |
+  o  17:7a6997f82fbe fb6281ea03e8 is my parent
+  |
+  o  16:fb6281ea03e8 added l
+  |
+  ~
+
   $ cd ..
 
 Check pick behavior regarding working copy branch (issue6089)