[PATCH] util: make walkrepos() return .hg/patches if present

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Thu Feb 21 14:10:13 CST 2008


The idea is for [collections] in hweb.conf to also serve patch queues.
As ThomasAH pointed out, this might benefit qclone. And it also
benefits the rqinit command in the rexec extension I am working on.
-peo

On Thu, Feb 21, 2008 at 9:06 PM, Peter Arrenbrecht
<peter.arrenbrecht at gmail.com> wrote:
> # HG changeset patch
>  # User Peter Arrenbrecht <peter.arrenbrecht at gmail.com>
>  # Date 1203623766 -3600
>  # Node ID 5130389d3dcda127b816c813319a7096541fde72
>  # Parent  d9d440a807d86e2af3d9a21d5921c418bffa2c61
>  util: make walkrepos() return .hg/patches if present
>
>  diff --git a/mercurial/util.py b/mercurial/util.py
>  --- a/mercurial/util.py
>  +++ b/mercurial/util.py
>  @@ -1707,6 +1707,9 @@ def walkrepos(path):
>          if '.hg' in dirs:
>              dirs[:] = [] # don't descend further
>              yield root # found a repository
>  +            qroot = os.path.join(root, '.hg', 'patches')
>  +            if os.path.exists(os.path.join(qroot, '.hg')):
>  +                yield qroot # we have a patch queue repo here
>
>   _rcpath = None
>
>


More information about the Mercurial-devel mailing list