Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/util.py @ 7525:6a49fa7674c1
hgweb: mq repos should be in non-recursive collections, too
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Fri, 19 Dec 2008 18:24:49 +0100 |
parents | e60aaae83323 |
children | 9e186bda013d 71be8688f2db |
comparison
equal
deleted
inserted
replaced
7524:7fc19b12cb6b | 7525:6a49fa7674c1 |
---|---|
1900 seen_dirs = [] | 1900 seen_dirs = [] |
1901 _add_dir_if_not_there(seen_dirs, path) | 1901 _add_dir_if_not_there(seen_dirs, path) |
1902 for root, dirs, files in os.walk(path, topdown=True, onerror=errhandler): | 1902 for root, dirs, files in os.walk(path, topdown=True, onerror=errhandler): |
1903 if '.hg' in dirs: | 1903 if '.hg' in dirs: |
1904 yield root # found a repository | 1904 yield root # found a repository |
1905 qroot = os.path.join(root, '.hg', 'patches') | |
1906 if os.path.isdir(os.path.join(qroot, '.hg')): | |
1907 yield qroot # we have a patch queue repo here | |
1905 if recurse: | 1908 if recurse: |
1906 # avoid recursing inside the .hg directory | 1909 # avoid recursing inside the .hg directory |
1907 # the mq repository is added in any case | |
1908 dirs.remove('.hg') | 1910 dirs.remove('.hg') |
1909 qroot = os.path.join(root, '.hg', 'patches') | |
1910 if os.path.isdir(os.path.join(qroot, '.hg')): | |
1911 yield qroot # we have a patch queue repo here | |
1912 else: | 1911 else: |
1913 dirs[:] = [] # don't descend further | 1912 dirs[:] = [] # don't descend further |
1914 elif followsym: | 1913 elif followsym: |
1915 newdirs = [] | 1914 newdirs = [] |
1916 for d in dirs: | 1915 for d in dirs: |