On 09/16/2016 01:10 PM, Stanislau Hlebik wrote:
# HG changeset patch # User Stanislau Hlebik <st...@fb.com> # Date 1473951984 25200 # Thu Sep 15 08:06:24 2016 -0700 # Node ID f3fb030f0e4601561ac94137c7481694407db7b7 # Parent b25504471680d6d14f3096997760bc3acd76089d bundleoperation: add applybookmarks flag This flag will be used by `bookmarks` part handler. If it is false then handler will make no changes to the repo and just add bookmarks to the `op.records`. If it is true then handler will change the repo bookmarks.
If I remember our tuesday discussion properly, we actually need at least three state here:
- Read only data fetch - apply with divergent bookmark - apply overwriting local value Picking a boolean will not allow that. What is your plan here?
diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -286,13 +286,15 @@ * a way to construct a bundle response when applicable. """ - def __init__(self, repo, transactiongetter, captureoutput=True): + def __init__(self, repo, transactiongetter, captureoutput=True, + applybookmarks=False): self.repo = repo self.ui = repo.ui self.records = unbundlerecords() self.gettransaction = transactiongetter self.reply = None self.captureoutput = captureoutput + self.applybookmarks = applybookmarks class TransactionUnavailable(RuntimeError): pass _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
-- Pierre-Yves David _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel