hgext/largefiles/lfutil.py
changeset 29320 016a90152e9c
parent 29309 bfc1052570b6
child 29341 0d83ad967bf8
equal deleted inserted replaced
29319:cc497d2830b0 29320:016a90152e9c
    18 
    18 
    19 from mercurial import (
    19 from mercurial import (
    20     dirstate,
    20     dirstate,
    21     error,
    21     error,
    22     httpconnection,
    22     httpconnection,
    23     match as match_,
    23     match as matchmod,
    24     node,
    24     node,
    25     scmutil,
    25     scmutil,
    26     util,
    26     util,
    27 )
    27 )
    28 
    28 
   159             lfdirstate.normallookup(lfile)
   159             lfdirstate.normallookup(lfile)
   160     return lfdirstate
   160     return lfdirstate
   161 
   161 
   162 def lfdirstatestatus(lfdirstate, repo):
   162 def lfdirstatestatus(lfdirstate, repo):
   163     wctx = repo['.']
   163     wctx = repo['.']
   164     match = match_.always(repo.root, repo.getcwd())
   164     match = matchmod.always(repo.root, repo.getcwd())
   165     unsure, s = lfdirstate.status(match, [], False, False, False)
   165     unsure, s = lfdirstate.status(match, [], False, False, False)
   166     modified, clean = s.modified, s.clean
   166     modified, clean = s.modified, s.clean
   167     for lfile in unsure:
   167     for lfile in unsure:
   168         try:
   168         try:
   169             fctx = wctx[standin(lfile)]
   169             fctx = wctx[standin(lfile)]
   540         # are modified so we can compare only against those.
   540         # are modified so we can compare only against those.
   541         # It can cost a lot of time (several seconds)
   541         # It can cost a lot of time (several seconds)
   542         # otherwise to update all standins if the largefiles are
   542         # otherwise to update all standins if the largefiles are
   543         # large.
   543         # large.
   544         lfdirstate = openlfdirstate(ui, repo)
   544         lfdirstate = openlfdirstate(ui, repo)
   545         dirtymatch = match_.always(repo.root, repo.getcwd())
   545         dirtymatch = matchmod.always(repo.root, repo.getcwd())
   546         unsure, s = lfdirstate.status(dirtymatch, [], False, False,
   546         unsure, s = lfdirstate.status(dirtymatch, [], False, False,
   547                                       False)
   547                                       False)
   548         modifiedfiles = unsure + s.modified + s.added + s.removed
   548         modifiedfiles = unsure + s.modified + s.added + s.removed
   549         lfiles = listlfiles(repo)
   549         lfiles = listlfiles(repo)
   550         # this only loops through largefiles that exist (not
   550         # this only loops through largefiles that exist (not