Mercurial > hg
comparison hgext/remotefilelog/remotefilelogserver.py @ 45372:77b8588dd84e
requirements: introduce new requirements related module
It was not clear where all requirements should and related APIs should be, this
patch introduces a requirements module which will have all exitsing requirements
and related APIs.
Differential Revision: https://phab.mercurial-scm.org/D8917
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 08 Aug 2020 16:24:12 +0530 |
parents | e58e234096de |
children | 10284ce3d5ed |
comparison
equal
deleted
inserted
replaced
45371:e58e234096de | 45372:77b8588dd84e |
---|---|
21 context, | 21 context, |
22 error, | 22 error, |
23 extensions, | 23 extensions, |
24 match, | 24 match, |
25 pycompat, | 25 pycompat, |
26 requirements, | |
26 store, | 27 store, |
27 streamclone, | 28 streamclone, |
28 util, | 29 util, |
29 wireprotoserver, | 30 wireprotoserver, |
30 wireprototypes, | 31 wireprototypes, |
31 wireprotov1server, | 32 wireprotov1server, |
32 ) | 33 ) |
33 from mercurial.interfaces import repository | |
34 from . import ( | 34 from . import ( |
35 constants, | 35 constants, |
36 shallowutil, | 36 shallowutil, |
37 ) | 37 ) |
38 | 38 |
168 n = util.pconvert(fp[striplen:]) | 168 n = util.pconvert(fp[striplen:]) |
169 yield (store.decodedir(n), n, st.st_size) | 169 yield (store.decodedir(n), n, st.st_size) |
170 if kind == stat.S_IFDIR: | 170 if kind == stat.S_IFDIR: |
171 visit.append(fp) | 171 visit.append(fp) |
172 | 172 |
173 if repository.TREEMANIFEST_REQUIREMENT in repo.requirements: | 173 if requirements.TREEMANIFEST_REQUIREMENT in repo.requirements: |
174 for (u, e, s) in repo.store.datafiles(): | 174 for (u, e, s) in repo.store.datafiles(): |
175 if u.startswith(b'meta/') and ( | 175 if u.startswith(b'meta/') and ( |
176 u.endswith(b'.i') or u.endswith(b'.d') | 176 u.endswith(b'.i') or u.endswith(b'.d') |
177 ): | 177 ): |
178 yield (u, e, s) | 178 yield (u, e, s) |