@@ -275,3 +275,39 @@ def update(
275275 local_flags .append ("--verbose" )
276276
277277 return self .run (["update" , * local_flags ], check_returncode = check_returncode )
278+
279+ def pull (
280+ self ,
281+ quiet : Optional [bool ] = None ,
282+ verbose : Optional [bool ] = None ,
283+ update : Optional [bool ] = None ,
284+ # libvcs special behavior
285+ check_returncode : Optional [bool ] = True ,
286+ * args : object ,
287+ ** kwargs : object ,
288+ ) -> str :
289+ """Update working directory
290+
291+ Wraps `hg update <https://www.mercurial-scm.org/doc/hg.1.html#pull>`_.
292+
293+ Examples
294+ --------
295+ >>> hg = Hg(dir=tmp_path)
296+ >>> hg_remote_repo = create_hg_remote_repo()
297+ >>> hg.clone(url=f'file://{hg_remote_repo}')
298+ 'updating to branch default...1 files updated, 0 files merged, ...'
299+ >>> hg.pull()
300+ 'pulling from ...searching for changes...no changes found'
301+ >>> hg.pull(update=True)
302+ 'pulling from ...searching for changes...no changes found'
303+ """
304+ local_flags : list [str ] = []
305+
306+ if quiet :
307+ local_flags .append ("--quiet" )
308+ if verbose :
309+ local_flags .append ("--verbose" )
310+ if update :
311+ local_flags .append ("--update" )
312+
313+ return self .run (["pull" , * local_flags ], check_returncode = check_returncode )
0 commit comments