Patchwork [1,of,6,remotenames-ext] selectivepull: add comments

login
register
mail settings
Submitter Stanislau Hlebik
Date Jan. 30, 2017, 3:55 p.m.
Message ID <8b66569e49ce63826704.1485791759@devvm1840.lla2.facebook.com>
Download mbox | patch
Permalink /patch/18278/
State Accepted
Headers show

Comments

Stanislau Hlebik - Jan. 30, 2017, 3:55 p.m.
# HG changeset patch
# User Stanislau Hlebik <stash@fb.com>
# Date 1485515845 28800
#      Fri Jan 27 03:17:25 2017 -0800
# Node ID 8b66569e49ce6382670497aa4e96c5e81c224439
# Parent  18f8e0f8ba54270bf158734c781327581cf43634
selectivepull: add comments

Explain why selectivepull is useful

Patch

diff --git a/remotenames.py b/remotenames.py
--- a/remotenames.py
+++ b/remotenames.py
@@ -101,6 +101,16 @@ 
 def expull(orig, repo, remote, *args, **kwargs):
     remotebookmarks = remote.listkeys('bookmarks')
     if _isselectivepull(repo.ui):
+        # if selectivepull is enabled then we don't save all of the remote
+        # bookmarks in remotenames file. Instead we save only bookmarks that
+        # are "interesting" to a user. Moreover, "hg pull" without parameters
+        # pulls only "interesting" bookmarks. There is a config option to
+        # set default "interesting" bookmarks
+        # (see _getselectivepulldefaultbookmarks).
+        # Then bookmark is considered "interesting" if user did
+        # "hg update REMOTE_BOOK_NAME" or "hg pull -B REMOTE_BOOK_NAME".
+        # Selectivepull is helpful when server has too many remote bookmarks
+        # because it may slow down clients.
         path = activepath(repo.ui, remote)
         bookmarks = {}
         for bookmark in readbookmarknames(repo, path):