pulkit updated this revision to Diff 8735.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2874?vs=7287&id=8735

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

AFFECTED FILES
  mercurial/exchange.py
  tests/test-logexchange.t

CHANGE DETAILS

diff --git a/tests/test-logexchange.t b/tests/test-logexchange.t
--- a/tests/test-logexchange.t
+++ b/tests/test-logexchange.t
@@ -339,3 +339,59 @@
      default/bar               6:87d6d6676308
      default/foo               3:62615734edd5
    * foo                       8:3e1487808078
+
+Testing the remotenames sychronization during `hg push`
+-------------------------------------------------------
+
+  $ cd ../server/
+  $ hg bookmark foo
+  moving bookmark 'foo' forward from 62615734edd5
+
+After the push, default/foo should move to rev 8
+  $ cd ../client/
+  $ hg push
+  pushing to ssh://user@dummy/server
+  searching for changes
+  no changes found
+  [1]
+  $ hg log -Gr 'remotenames()'
+  @  changeset:   8:3e1487808078
+  :  branch:      wat
+  :  bookmark:    foo
+  :  tag:         tip
+  :  remote bookmark:  default/foo
+  :  hoisted name:  foo
+  :  remote branch:  $TESTTMP/server2/wat
+  :  remote branch:  default/wat
+  :  parent:      4:aa98ab95a928
+  :  user:        test
+  :  date:        Thu Jan 01 00:00:00 1970 +0000
+  :  summary:     added bar
+  :
+  : o  changeset:   7:ec2426147f0e
+  : |  remote branch:  $TESTTMP/server2/default
+  : |  remote branch:  default/default
+  : |  user:        test
+  : |  date:        Thu Jan 01 00:00:00 1970 +0000
+  : |  summary:     Added h
+  : |
+  : o  changeset:   6:87d6d6676308
+  :/   remote bookmark:  $TESTTMP/server2/bar
+  :    remote bookmark:  default/bar
+  :    hoisted name:  bar
+  :    user:        test
+  :    date:        Thu Jan 01 00:00:00 1970 +0000
+  :    summary:     Added g
+  :
+  o  changeset:   3:62615734edd5
+  |  remote bookmark:  $TESTTMP/server2/foo
+  ~  user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     Added d
+  
+  $ hg bookmarks
+     $TESTTMP/server2/bar 6:87d6d6676308
+     $TESTTMP/server2/foo 3:62615734edd5
+     default/bar               6:87d6d6676308
+     default/foo               8:3e1487808078
+   * foo                       8:3e1487808078
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -534,6 +534,9 @@
         _pushobsolete(pushop)
         _pushbookmark(pushop)
 
+    if repo.ui.configbool('experimental', 'remotenames'):
+        logexchange.pullremotenames(repo, remote)
+
     return pushop
 
 # list of steps to perform discovery before push



To: pulkit, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to