Patchwork exchange: fix docs for pulloperation

login
register
mail settings
Submitter Siddharth Agarwal
Date Feb. 28, 2014, 3:58 a.m.
Message ID <a28b2fcea899f439decb.1393559936@dev1738.prn1.facebook.com>
Download mbox | patch
Permalink /patch/3805/
State Accepted
Commit 004a1744088dbd42abf3cfad4ac71c2547be630d
Headers show

Comments

Siddharth Agarwal - Feb. 28, 2014, 3:58 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1393559796 28800
#      Thu Feb 27 19:56:36 2014 -0800
# Node ID a28b2fcea899f439decb677d725d6e14b6a52ab1
# Parent  02c303f6491772c1df4d5ce25f2bde5884ee3b96
exchange: fix docs for pulloperation

'remote' is actually the remote, not the repo one is pulling into. This
confused me quite a bit.
Augie Fackler - Feb. 28, 2014, 5:19 p.m.
On Thu, Feb 27, 2014 at 07:58:56PM -0800, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1393559796 28800
> #      Thu Feb 27 19:56:36 2014 -0800
> # Node ID a28b2fcea899f439decb677d725d6e14b6a52ab1
> # Parent  02c303f6491772c1df4d5ce25f2bde5884ee3b96
> exchange: fix docs for pulloperation

queued, thanks

>
> 'remote' is actually the remote, not the repo one is pulling into. This
> confused me quite a bit.
>
> diff --git a/mercurial/exchange.py b/mercurial/exchange.py
> --- a/mercurial/exchange.py
> +++ b/mercurial/exchange.py
> @@ -378,14 +378,14 @@
>
>      It purpose is to carry push related state and very common operation.
>
> -    A new should be created at the begining of each push and discarded
> +    A new should be created at the begining of each pull and discarded
>      afterward.
>      """
>
>      def __init__(self, repo, remote, heads=None, force=False):
> +        # repo we pull into
> +        self.repo = repo
>          # repo we pull from
> -        self.repo = repo
> -        # repo we pull to
>          self.remote = remote
>          # revision we try to pull (None is "all")
>          self.heads = heads
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -378,14 +378,14 @@ 
 
     It purpose is to carry push related state and very common operation.
 
-    A new should be created at the begining of each push and discarded
+    A new should be created at the begining of each pull and discarded
     afterward.
     """
 
     def __init__(self, repo, remote, heads=None, force=False):
+        # repo we pull into
+        self.repo = repo
         # repo we pull from
-        self.repo = repo
-        # repo we pull to
         self.remote = remote
         # revision we try to pull (None is "all")
         self.heads = heads