comparison hgext/largefiles/lfutil.py @ 15349:63455eb771af stable

largefiles: drop more unnecessary compatibility checks
author Greg Ward <greg@gerg.ca>
date Sun, 23 Oct 2011 10:23:31 -0400
parents 799e56609ef6
children 8b8dd13295db
comparison
equal deleted inserted replaced
15348:c681e478c429 15349:63455eb771af
133 Return a dirstate object that tracks largefiles: i.e. its root is 133 Return a dirstate object that tracks largefiles: i.e. its root is
134 the repo root, but it is saved in .hg/largefiles/dirstate. 134 the repo root, but it is saved in .hg/largefiles/dirstate.
135 ''' 135 '''
136 admin = repo.join(longname) 136 admin = repo.join(longname)
137 opener = scmutil.opener(admin) 137 opener = scmutil.opener(admin)
138 if util.safehasattr(repo.dirstate, '_validate'): 138 lfdirstate = largefiles_dirstate(opener, ui, repo.root,
139 lfdirstate = largefiles_dirstate(opener, ui, repo.root, 139 repo.dirstate._validate)
140 repo.dirstate._validate)
141 else:
142 lfdirstate = largefiles_dirstate(opener, ui, repo.root)
143 140
144 # If the largefiles dirstate does not exist, populate and create 141 # If the largefiles dirstate does not exist, populate and create
145 # it. This ensures that we create it on the first meaningful 142 # it. This ensures that we create it on the first meaningful
146 # largefiles operation in a new clone. It also gives us an easy 143 # largefiles operation in a new clone. It also gives us an easy
147 # way to forcibly rebuild largefiles state: 144 # way to forcibly rebuild largefiles state: