Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/dirstate.py @ 2061:5987c1eac2ce
support nested repositories.
mercurial will not recurse into a subdirectory that contains a .hg
directory. it is treated as a separate repository.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 31 Mar 2006 17:00:09 -0800 |
parents | a59da8cc35e4 |
children | 5460f0196f77 |
comparison
equal
deleted
inserted
replaced
2030:8d9ec30d58bc | 2061:5987c1eac2ce |
---|---|
338 top = work.pop() | 338 top = work.pop() |
339 names = os.listdir(top) | 339 names = os.listdir(top) |
340 names.sort() | 340 names.sort() |
341 # nd is the top of the repository dir tree | 341 # nd is the top of the repository dir tree |
342 nd = util.normpath(top[len(self.root) + 1:]) | 342 nd = util.normpath(top[len(self.root) + 1:]) |
343 if nd == '.': nd = '' | 343 if nd == '.': |
344 nd = '' | |
345 else: | |
346 hg = bisect.bisect_left(names, '.hg') | |
347 if hg < len(names) and names[hg] == '.hg': | |
348 if os.path.isdir(os.path.join(top, '.hg')): | |
349 continue | |
344 for f in names: | 350 for f in names: |
345 np = util.pconvert(os.path.join(nd, f)) | 351 np = util.pconvert(os.path.join(nd, f)) |
346 if seen(np): | 352 if seen(np): |
347 continue | 353 continue |
348 p = os.path.join(top, f) | 354 p = os.path.join(top, f) |