153 for f in sorted(remove + forget): |
153 for f in sorted(remove + forget): |
154 if ui.verbose or not m.exact(f): |
154 if ui.verbose or not m.exact(f): |
155 ui.status(_('removing %s\n') % m.rel(f)) |
155 ui.status(_('removing %s\n') % m.rel(f)) |
156 |
156 |
157 # Need to lock because standin files are deleted then removed from the |
157 # Need to lock because standin files are deleted then removed from the |
158 # repository and we could race inbetween. |
158 # repository and we could race in-between. |
159 wlock = repo.wlock() |
159 wlock = repo.wlock() |
160 try: |
160 try: |
161 lfdirstate = lfutil.openlfdirstate(ui, repo) |
161 lfdirstate = lfutil.openlfdirstate(ui, repo) |
162 for f in remove: |
162 for f in remove: |
163 if not after: |
163 if not after: |
249 result = result or lfcommands.verifylfiles(ui, repo, all, contents) |
249 result = result or lfcommands.verifylfiles(ui, repo, all, contents) |
250 return result |
250 return result |
251 |
251 |
252 # Override needs to refresh standins so that update's normal merge |
252 # Override needs to refresh standins so that update's normal merge |
253 # will go through properly. Then the other update hook (overriding repo.update) |
253 # will go through properly. Then the other update hook (overriding repo.update) |
254 # will get the new files. Filemerge is also overriden so that the merge |
254 # will get the new files. Filemerge is also overridden so that the merge |
255 # will merge standins correctly. |
255 # will merge standins correctly. |
256 def overrideupdate(orig, ui, repo, *pats, **opts): |
256 def overrideupdate(orig, ui, repo, *pats, **opts): |
257 lfdirstate = lfutil.openlfdirstate(ui, repo) |
257 lfdirstate = lfutil.openlfdirstate(ui, repo) |
258 s = lfdirstate.status(match_.always(repo.root, repo.getcwd()), [], False, |
258 s = lfdirstate.status(match_.always(repo.root, repo.getcwd()), [], False, |
259 False, False) |
259 False, False) |
694 source = 'default' |
694 source = 'default' |
695 oldheads = lfutil.getcurrentheads(repo) |
695 oldheads = lfutil.getcurrentheads(repo) |
696 result = orig(ui, repo, source, **opts) |
696 result = orig(ui, repo, source, **opts) |
697 # If we do not have the new largefiles for any new heads we pulled, we |
697 # If we do not have the new largefiles for any new heads we pulled, we |
698 # will run into a problem later if we try to merge or rebase with one of |
698 # will run into a problem later if we try to merge or rebase with one of |
699 # these heads, so cache the largefiles now direclty into the system |
699 # these heads, so cache the largefiles now directly into the system |
700 # cache. |
700 # cache. |
701 ui.status(_("caching new largefiles\n")) |
701 ui.status(_("caching new largefiles\n")) |
702 numcached = 0 |
702 numcached = 0 |
703 heads = lfutil.getcurrentheads(repo) |
703 heads = lfutil.getcurrentheads(repo) |
704 newheads = set(heads).difference(set(oldheads)) |
704 newheads = set(heads).difference(set(oldheads)) |
910 for f in forget: |
910 for f in forget: |
911 if ui.verbose or not m.exact(f): |
911 if ui.verbose or not m.exact(f): |
912 ui.status(_('removing %s\n') % m.rel(f)) |
912 ui.status(_('removing %s\n') % m.rel(f)) |
913 |
913 |
914 # Need to lock because standin files are deleted then removed from the |
914 # Need to lock because standin files are deleted then removed from the |
915 # repository and we could race inbetween. |
915 # repository and we could race in-between. |
916 wlock = repo.wlock() |
916 wlock = repo.wlock() |
917 try: |
917 try: |
918 lfdirstate = lfutil.openlfdirstate(ui, repo) |
918 lfdirstate = lfutil.openlfdirstate(ui, repo) |
919 for f in forget: |
919 for f in forget: |
920 if lfdirstate[f] == 'a': |
920 if lfdirstate[f] == 'a': |