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

login
register
mail settings
Submitter Gregory Szorc
Date Oct. 24, 2014, 5:31 p.m.
Message ID <ca211c3e3ad01c2c9b11.1414171896@3.1.168.192.in-addr.arpa>
Download mbox | patch
Permalink /patch/6459/
State Superseded
Headers show

Comments

Gregory Szorc - Oct. 24, 2014, 5:31 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@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.
Gregory Szorc - Oct. 24, 2014, 5:33 p.m.
Working on the patch now. Just wanted to raise this as a potential 3.2 
blocker.

On 10/24/14 10:31 AM, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc@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 ..
>
Pierre-Yves David - Oct. 26, 2014, 11:03 a.m.
On 10/24/2014 07:33 PM, Gregory Szorc wrote:
> Working on the patch now. Just wanted to raise this as a potential 3.2

The right way to do this is to create a bug in the tracker with keyword 
"regression" and priority urgent. This gives use a single place to check 
for them.

Thanks for finding.

Patch

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 ..