mercurial/cmdutil.py
changeset 32005 2406dbba49bd
parent 31807 e6eb86b154c5
child 32045 3eceeede26e9
--- a/mercurial/cmdutil.py	Fri Mar 31 23:00:41 2017 -0400
+++ b/mercurial/cmdutil.py	Sat Apr 15 18:05:40 2017 -0400
@@ -2290,6 +2290,15 @@
         bad.extend(f for f in rejected if f in match.files())
     return bad
 
+def addwebdirpath(repo, serverpath, webconf):
+    webconf[serverpath] = repo.root
+    repo.ui.debug('adding %s = %s\n' % (serverpath, repo.root))
+
+    for r in repo.revs('filelog("path:.hgsub")'):
+        ctx = repo[r]
+        for subpath in ctx.substate:
+            ctx.sub(subpath).addwebdirpath(serverpath, webconf)
+
 def forget(ui, repo, match, prefix, explicitonly):
     join = lambda f: os.path.join(prefix, f)
     bad = []