D2874: remotenames: synchronise remotenames after push also

2018-07-09 Thread pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4d5fb4062f0b: remotenames: synchronise remotenames after 
push also (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2874?vs=9314=9477

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 +
+  :  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 +
+  : |  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 +
+  :summary: Added g
+  :
+  o  changeset:   3:62615734edd5
+  |  remote bookmark:  $TESTTMP/server2/foo
+  ~  user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ 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
@@ -531,6 +531,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, durin42
Cc: indygreg, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2874: remotenames: synchronise remotenames after push also

2018-06-26 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 9314.

REPOSITORY
  rHG Mercurial

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

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 +
+  :  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 +
+  : |  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 +
+  :summary: Added g
+  :
+  o  changeset:   3:62615734edd5
+  |  remote bookmark:  $TESTTMP/server2/foo
+  ~  user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ 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
@@ -531,6 +531,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


D2874: remotenames: synchronise remotenames after push also

2018-05-18 Thread pulkit (Pulkit Goyal)
pulkit added a comment.


  Irrespective of https://phab.mercurial-scm.org/D2873 and 
https://phab.mercurial-scm.org/D2875, this should be non-controversial and good 
to go.

REPOSITORY
  rHG Mercurial

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

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


D2874: remotenames: synchronise remotenames after push also

2018-05-18 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 8735.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2874?vs=7287=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 +
+  :  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 +
+  : |  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 +
+  :summary: Added g
+  :
+  o  changeset:   3:62615734edd5
+  |  remote bookmark:  $TESTTMP/server2/foo
+  ~  user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ 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


D2874: remotenames: synchronise remotenames after push also

2018-04-11 Thread indygreg (Gregory Szorc)
indygreg accepted this revision.
indygreg added a comment.
This revision is now accepted and ready to land.


  I'm not crazy about the implementation. But for an experimental feature, I 
think it is fine. The bundle2 changes to do this right are definitely scope 
bloat.

INLINE COMMENTS

> exchange.py:491
> +if repo.ui.configbool('experimental', 'remotenames'):
> +logexchange.pullremotenames(repo, remote)
> +

In a bundle2 world, the news names would ideally be returned by a bundle2 part 
(this will require 2 extra round trips to the server as implemented). But I 
think this implementation is fine for an experimental feature.

Also, if the local repo doesn't have names from the remote, we'll never see 
them. At some point down the long shallow clone road, we'll need to consider 
what we should be about nodes we know exist remotely but aren't available 
locally. But this problem can be deferred for a while.

REPOSITORY
  rHG Mercurial

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

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


D2874: remotenames: synchronise remotenames after push also

2018-03-26 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 7287.

REPOSITORY
  rHG Mercurial

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

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
@@ -457,20 +457,21 @@
  bar   6:87d6d6676308
  foo   9:aa6a885086c0
 
-XXX: remotebookmarks should have been updated after this push
   $ hg log -G
   @  changeset:   9:aa6a885086c0
   |  branch:  wat
   |  tag: tip
+  |  remote bookmark:  default/foo
+  |  hoisted name:  foo
+  |  remote branch:  default/wat
   |  user:test
   |  date:Thu Jan 01 00:00:00 1970 +
   |  summary: added foobar
   |
   o  changeset:   8:3e1487808078
   |  branch:  wat
   |  bookmark:foo
   |  remote branch:  $TESTTMP/server2/wat
-  |  remote branch:  default/wat
   |  parent:  4:aa98ab95a928
   |  user:test
   |  date:Thu Jan 01 00:00:00 1970 +
@@ -503,8 +504,6 @@
   |
   o  changeset:   3:62615734edd5
   |  remote bookmark:  $TESTTMP/server2/foo
-  |  remote bookmark:  default/foo
-  |  hoisted name:  foo
   |  user:test
   |  date:Thu Jan 01 00:00:00 1970 +
   |  summary: Added d
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -487,6 +487,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
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2874: remotenames: synchronise remotenames after push also

2018-03-22 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 7250.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2874?vs=7104=7250

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
@@ -457,20 +457,21 @@
  bar   6:87d6d6676308
  foo   9:aa6a885086c0
 
-XXX: remotebookmarks should have been updated after this push
   $ hg log -G
   @  changeset:   9:aa6a885086c0
   |  branch:  wat
   |  tag: tip
+  |  remote bookmark:  default/foo
+  |  hoisted name:  foo
+  |  remote branch:  default/wat
   |  user:test
   |  date:Thu Jan 01 00:00:00 1970 +
   |  summary: added foobar
   |
   o  changeset:   8:3e1487808078
   |  branch:  wat
   |  bookmark:foo
   |  remote branch:  $TESTTMP/server2/wat
-  |  remote branch:  default/wat
   |  parent:  4:aa98ab95a928
   |  user:test
   |  date:Thu Jan 01 00:00:00 1970 +
@@ -503,8 +504,6 @@
   |
   o  changeset:   3:62615734edd5
   |  remote bookmark:  $TESTTMP/server2/foo
-  |  remote bookmark:  default/foo
-  |  hoisted name:  foo
   |  user:test
   |  date:Thu Jan 01 00:00:00 1970 +
   |  summary: Added d
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -484,6 +484,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
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2874: remotenames: synchronise remotenames after push also

2018-03-19 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 7104.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2874?vs=7062=7104

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
@@ -457,20 +457,21 @@
  bar   6:87d6d6676308
  foo   9:aa6a885086c0
 
-XXX: remotebookmarks should have been updated after this push
   $ hg log -G
   @  changeset:   9:aa6a885086c0
   |  branch:  wat
   |  tag: tip
+  |  remote bookmark:  default/foo
+  |  hoistedname:  foo
+  |  remote branch:  default/wat
   |  user:test
   |  date:Thu Jan 01 00:00:00 1970 +
   |  summary: added foobar
   |
   o  changeset:   8:3e1487808078
   |  branch:  wat
   |  bookmark:foo
   |  remote branch:  $TESTTMP/server2/wat
-  |  remote branch:  default/wat
   |  parent:  4:aa98ab95a928
   |  user:test
   |  date:Thu Jan 01 00:00:00 1970 +
@@ -503,8 +504,6 @@
   |
   o  changeset:   3:62615734edd5
   |  remote bookmark:  $TESTTMP/server2/foo
-  |  remote bookmark:  default/foo
-  |  hoistedname:  foo
   |  user:test
   |  date:Thu Jan 01 00:00:00 1970 +
   |  summary: Added d
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -484,6 +484,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
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2874: remotenames: synchronise remotenames after push also

2018-03-15 Thread pulkit (Pulkit Goyal)
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Earlier we use to pull remotenames information from the server in case of pull
  and clone only. This patch adds logic to push also command to pull remotenames
  information.
  
  This will help us in keeping the remotenames more upto date where there are a
  lot people changing state of branches and bookmarks at the server.

REPOSITORY
  rHG Mercurial

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
@@ -376,19 +376,19 @@
  bar   6:87d6d6676308
  foo   9:aa6a885086c0
 
-XXX: remotebookmarks should have been updated after this push
   $ hg log -G
   @  changeset:   9:aa6a885086c0
   |  branch:  wat
   |  tag: tip
+  |  remote bookmark:  default/foo
+  |  remote branch:  default/wat
   |  user:test
   |  date:Thu Jan 01 00:00:00 1970 +
   |  summary: added foobar
   |
   o  changeset:   8:3e1487808078
   |  branch:  wat
   |  remote branch:  $TESTTMP/server2/wat
-  |  remote branch:  default/wat
   |  parent:  4:aa98ab95a928
   |  user:test
   |  date:Thu Jan 01 00:00:00 1970 +
@@ -422,7 +422,6 @@
   o  changeset:   3:62615734edd5
   |  bookmark:foo
   |  remote bookmark:  $TESTTMP/server2/foo
-  |  remote bookmark:  default/foo
   |  user:test
   |  date:Thu Jan 01 00:00:00 1970 +
   |  summary: Added d
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -484,6 +484,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
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel