[PATCH] mq: hgwebdir walk .hg/patches/.hg when using collections

OHASHI Hideya ohachige at gmail.com
Wed Aug 29 10:19:50 CDT 2007


# HG changeset patch
# User OHASHI Hideya <ohachige at gmail.com>
# Date 1188400706 -32400
# Node ID 35ce0415dd505a5ee80d5910061e2803aef04506
# Parent  8a0fefa9f16c3553631c129a7028959dfffd5af3
mq: hgwebdir walk .hg/patches/.hg when using collections

diff -r 8a0fefa9f16c -r 35ce0415dd50 hgext/mq.py
--- a/hgext/mq.py	Thu Aug 30 00:05:18 2007 +0900
+++ b/hgext/mq.py	Thu Aug 30 00:18:26 2007 +0900
@@ -39,6 +39,17 @@ commands.norepo += " qclone qversion"
 # Patch names looks like unix-file names.
 # They must be joinable with queue directory and result in the patch path.
 normname = util.normpath
+
+orig_walkrepos = util.walkrepos
+
+def mq_walkrepos(path):
+    for path in orig_walkrepos(path):
+        yield(path)
+        p_path = os.path.join(path, ".hg", "patches")
+        if os.path.isdir(p_path):
+            yield(p_path) 
+
+util.walkrepos = mq_walkrepos
 
 class statusentry:
     def __init__(self, rev, name=None):


More information about the Mercurial-devel mailing list