merge: with stable
authorAugie Fackler <augie@google.com>
Fri, 25 Mar 2022 11:33:12 -0400
changeset 49062 533820f5b997
parent 49061 9dfbea54b680 (current diff)
parent 48818 6e7ae547e38d (diff)
child 49063 e8138eba17ee
merge: with stable
hgext/uncommit.py
--- a/hgext/uncommit.py	Thu Mar 17 11:19:06 2022 -0700
+++ b/hgext/uncommit.py	Fri Mar 25 11:33:12 2022 -0400
@@ -273,6 +273,15 @@
         if len(curctx.parents()) > 1:
             raise error.InputError(_(b"cannot unamend merge changeset"))
 
+        expected_keys = (b'amend_source', b'unamend_source')
+        if not any(key in curctx.extra() for key in expected_keys):
+            raise error.InputError(
+                _(
+                    b"working copy parent was not created by 'hg amend' or "
+                    b"'hg unamend'"
+                )
+            )
+
         # identify the commit to which to unamend
         markers = list(predecessormarkers(curctx))
         if len(markers) != 1:
--- a/i18n/ja.po	Thu Mar 17 11:19:06 2022 -0700
+++ b/i18n/ja.po	Fri Mar 25 11:33:12 2022 -0400
@@ -26642,7 +26642,7 @@
 
 msgid ""
 "``pullbundle``\n"
-"    When set, the server will check pullbundle.manifest for bundles\n"
+"    When set, the server will check pullbundles.manifest for bundles\n"
 "    covering the requested heads and common nodes. The first matching\n"
 "    entry will be streamed to the client."
 msgstr ""
--- a/i18n/pt_BR.po	Thu Mar 17 11:19:06 2022 -0700
+++ b/i18n/pt_BR.po	Fri Mar 25 11:33:12 2022 -0400
@@ -27460,12 +27460,12 @@
 
 msgid ""
 "``pullbundle``\n"
-"    When set, the server will check pullbundle.manifest for bundles\n"
+"    When set, the server will check pullbundles.manifest for bundles\n"
 "    covering the requested heads and common nodes. The first matching\n"
 "    entry will be streamed to the client."
 msgstr ""
 "``pullbundle``\n"
-"    Se definido, o servidor verificará pullbundle.manifest para\n"
+"    Se definido, o servidor verificará pullbundles.manifest para\n"
 "    arquivos de bundle que contiverem as cabeças e nós comuns\n"
 "    pedidos. A primeira entrada correspondente será enviadas para\n"
 "    o cliente."
--- a/mercurial/helptext/config.txt	Thu Mar 17 11:19:06 2022 -0700
+++ b/mercurial/helptext/config.txt	Fri Mar 25 11:33:12 2022 -0400
@@ -2293,7 +2293,7 @@
     effectively prevents concurrent pushes.
 
 ``pullbundle``
-    When set, the server will check pullbundle.manifest for bundles
+    When set, the server will check pullbundles.manifest for bundles
     covering the requested heads and common nodes. The first matching
     entry will be streamed to the client.
 
--- a/tests/test-pull-bundle.t	Thu Mar 17 11:19:06 2022 -0700
+++ b/tests/test-pull-bundle.t	Fri Mar 25 11:33:12 2022 -0400
@@ -194,7 +194,7 @@
   * sending pullbundle "0.hg" (glob)
   $ rm repo/.hg/blackbox.log
 
-Test processing when nodes used in the pullbundle.manifest end up being hidden
+Test processing when nodes used in the pullbundles.manifest end up being hidden
 
   $ hg --repo repo debugobsolete ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a
   1 new obsolescence markers
--- a/tests/test-unamend.t	Thu Mar 17 11:19:06 2022 -0700
+++ b/tests/test-unamend.t	Fri Mar 25 11:33:12 2022 -0400
@@ -39,8 +39,23 @@
 Trying to unamend when there was no amend done
 
   $ hg unamend
+  abort: working copy parent was not created by 'hg amend' or 'hg unamend'
+  [10]
+  $ echo "bar" >> h
+
+Trying to unamend when the obsmarker is missing
+
+  $ hg amend
+  $ hg debugobsolete --delete 0
+  deleted 1 obsolescence markers
+  $ hg unamend
   abort: changeset must have one predecessor, found 0 predecessors
   [10]
+  $ hg strip tip --config extensions.strip=
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/c9fa1a715c1b-06e5c233-backup.hg
+  $ hg up tip
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 Unamend on clean wdir and tip