D1356: remotenames: add test showing overwriting on remotenames data

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Fri Nov 10 14:01:15 EST 2017


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The current storage logic every time overwrites the existing data with the new
  data. This patch adds test to demonstrate that. To fix this, we need to add
  logic to read existing remotenames data and merge with existing data which will
  be added in upcoming changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1356

AFFECTED FILES
  tests/test-remotenames.t

CHANGE DETAILS

diff --git a/tests/test-remotenames.t b/tests/test-remotenames.t
--- a/tests/test-remotenames.t
+++ b/tests/test-remotenames.t
@@ -67,3 +67,34 @@
   $ cat .hg/remotenames/branches
   ec2426147f0e39dbc9cef599b066be6035ce691d file:$TESTTMP/server default
   3e1487808078543b0af6d10dadf5d46943578db0 file:$TESTTMP/server wat
+
+Making a new server
+-------------------
+
+  $ cd ..
+  $ hg init server2
+  $ cd server2
+  $ hg pull ../server/
+  pulling from ../server/
+  requesting all changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 9 changesets with 9 changes to 9 files (+1 heads)
+  adding remote bookmark bar
+  adding remote bookmark foo
+  (run 'hg heads' to see heads)
+
+Pulling form the new server
+---------------------------
+  $ cd ../client/
+  $ hg pull ../server2/
+  pulling from ../server2/
+  searching for changes
+  no changes found
+  $ cat .hg/remotenames/bookmarks
+  87d6d66763085b629e6d7ed56778c79827273022 file:$TESTTMP/server2 bar
+  62615734edd52f06b6fb9c2beb429e4fe30d57b8 file:$TESTTMP/server2 foo
+  $ cat .hg/remotenames/branches
+  ec2426147f0e39dbc9cef599b066be6035ce691d file:$TESTTMP/server2 default
+  3e1487808078543b0af6d10dadf5d46943578db0 file:$TESTTMP/server2 wat



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list