Mercurial > hg
comparison mercurial/util.py @ 1829:b0f6af327fd4
hgwebdir: export collections of repos
now you can use [collections] section in hgweb.config to export entire
tree of repos.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 10 Feb 2006 11:25:07 -0800 |
parents | ae61937c61c5 |
children | 4ced57680ce7 |
comparison
equal
deleted
inserted
replaced
1712:21dcf38e5d7d | 1829:b0f6af327fd4 |
---|---|
688 t, tz = date or makedate() | 688 t, tz = date or makedate() |
689 return ("%s %+03d%02d" % | 689 return ("%s %+03d%02d" % |
690 (time.strftime(format, time.gmtime(float(t) - tz)), | 690 (time.strftime(format, time.gmtime(float(t) - tz)), |
691 -tz / 3600, | 691 -tz / 3600, |
692 ((-tz % 3600) / 60))) | 692 ((-tz % 3600) / 60))) |
693 | |
694 def walkrepos(path): | |
695 '''yield every hg repository under path, recursively.''' | |
696 def errhandler(err): | |
697 if err.filename == path: | |
698 raise err | |
699 | |
700 for root, dirs, files in os.walk(path, onerror=errhandler): | |
701 for d in dirs: | |
702 if d == '.hg': | |
703 yield root | |
704 dirs[:] = [] | |
705 break |