diff tests/test-pending.t @ 24822:8678b1eafbcf stable

changelog: fix readpending if no pending data exist (issue4609) Since transaction are used for more than just changesets, it is possible to have a transaction without new changesets at all. In this case no ''00changelog.i.a' are written. In all cases the 'changelog.readpending' method is called if the repository has any pending data. The 'revlog' logic provides empty content if the file is missing, so the whole operation resulted in an empty changelog. We now skip reading the pending file if it is missing.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 20 Apr 2015 17:16:22 +0200
parents 921458360270
children b2c1ff96c1e1
line wrap: on
line diff
--- a/tests/test-pending.t	Mon Apr 20 15:27:55 2015 +0200
+++ b/tests/test-pending.t	Mon Apr 20 17:16:22 2015 +0200
@@ -113,3 +113,27 @@
   rollback completed
   abort: pretxnchangegroup hook exited with status 1
   pull 0000000000000000000000000000000000000000
+
+Test that pending on transaction without changegroup see the normal changegroup(
+(issue4609)
+
+  $ cat <<EOF > parent/.hg/hgrc
+  > [hooks]
+  > pretxnchangegroup=
+  > pretxnclose = hg tip -T 'tip: {node|short}\n'
+  > [phases]
+  > publishing=False
+  > EOF
+
+setup
+
+  $ cd parent
+  $ echo a > a
+  $ hg add a
+  $ hg commit -m a
+  tip: cb9a9f314b8b
+
+actual test
+
+  $ hg phase --public .
+  tip: cb9a9f314b8b