diff tests/test-bookmarks-pushpull.t @ 23082:0fc4686de1d7 stable

exchange: don't report failure from identical bookmarks 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 fixes the regression introduced by b901645a8784 by having the bookmark error reporting code filter identical bookmarks and adds a test for the behavior.
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 24 Oct 2014 17:24:46 -0500
parents fab9dda0f2a3
children c35ffa4249ca
line wrap: on
line diff
--- a/tests/test-bookmarks-pushpull.t	Fri Oct 24 10:40:37 2014 -0700
+++ b/tests/test-bookmarks-pushpull.t	Fri Oct 24 17:24:46 2014 -0500
@@ -438,3 +438,29 @@
   cc978a373a53 tip W
 
   $ cd ..
+
+pushing an unchanged bookmark should result in no changes
+
+  $ hg init unchanged-a
+  $ hg init unchanged-b
+  $ cd unchanged-a
+  $ echo initial > foo
+  $ hg commit -A -m initial
+  adding foo
+  $ hg bookmark @
+  $ hg push -B @ ../unchanged-b
+  pushing to ../unchanged-b
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  exporting bookmark @
+
+  $ hg push -B @ ../unchanged-b
+  pushing to ../unchanged-b
+  searching for changes
+  no changes found
+  [1]
+
+  $ cd ..