[PATCH STABLE] tests: add test for failing bookmark push code

Gregory Szorc gregory.szorc at gmail.com
Fri Oct 24 12:31:36 CDT 2014


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1414171261 25200
#      Fri Oct 24 10:21:01 2014 -0700
# Branch stable
# Node ID ca211c3e3ad01c2c9b11130235e3ee69fbcc16bf
# Parent  eb763217152ab2b472416bcc57722451c317f282
tests: add test for failing bookmark push code

b901645a8784 regressed the behavior of pushing an unchanged bookmark to
a remote. Before that commit, pushing a unchanged bookmark would result
in "exporting bookmark @" being printed. After that commit, we now see
an incorrect message "bookmark %s does not exist on the local or remote
repository!"

This patch adds a test that demonstrates the faulty behavior.

diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -436,5 +436,14 @@ pushing a new bookmark on a new head doe
   exporting bookmark W
   $ hg -R ../b id -r W
   cc978a373a53 tip W
 
+BUGGY pushing an unchanged bookmark should result in no changes
+
+  $ hg push -B W
+  pushing to http://localhost:$HGPORT/
+  searching for changes
+  bookmark W does not exist on the local or remote repository!
+  no changes found
+  [2]
+
   $ cd ..


More information about the Mercurial-devel mailing list