D5449: pull: fix inconsistent view of bookmarks during pull (issue4700)

valentin.gatienbaron (Valentin Gatien-Baron) phabricator at mercurial-scm.org
Wed Dec 19 22:34:54 EST 2018


valentin.gatienbaron added a comment.


  I went this way in part because it's fairly simple change, and might be useful in other circumstances (to interpret pulling a tag as actually pulling the tag itself perhaps, though I don't know concretely how that would work).
  
  AFAIK, the protocol is never stateful (not sure how that'd work with http), so you can't rely on a notion of session-level state on the server to guarantee consistency.
  I can see two plausible alternatives:
  
  1. doing all the lookup queries and the bookmarks query in a single roundtrip. Is it guaranteed that a group of batchable queries will be sent in one go and won't be split up (if there are many of them for instance)?
  2. tweak the new lookup query to be instead `lookup(name, bookmark=node)`, which would mean: `lookup(name)` as if there exist a bookmark called `name` pointing to `node`. So kind of the snapshot idea, where you give the server the relevant part of the snapshot.

REPOSITORY
  rHG Mercurial

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

To: valentin.gatienbaron, #hg-reviewers
Cc: yuja, indygreg, mercurial-devel


More information about the Mercurial-devel mailing list