diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1553,7 +1553,8 @@ branch=opts.get('branch'), shareopts=opts.get('shareopts'), storeincludepats=includepats, - storeexcludepats=excludepats) + storeexcludepats=excludepats, + depth=opts.get('depth') or None) return r is None