pull: move `force` argument into pull object
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Sat, 01 Feb 2014 03:49:29 -0800
changeset 20475 b79b405583af
parent 20474 c9bceafc61be
child 20476 1180c6ec5695
pull: move `force` argument into pull object One more step toward a more modular pulh function.
mercurial/exchange.py
--- a/mercurial/exchange.py	Thu Jan 30 17:35:55 2014 -0800
+++ b/mercurial/exchange.py	Sat Feb 01 03:49:29 2014 -0800
@@ -382,13 +382,15 @@
     afterward.
     """
 
-    def __init__(self, repo, remote, heads=None):
+    def __init__(self, repo, remote, heads=None, force=False):
         # 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
+        # do we force pull?
+        self.force = force
 
 def pull(repo, remote, heads=None, force=False):
     pullop = pulloperation(repo, remote, heads)