# HG changeset patch # User FUJIWARA Katsunori # Date 1427259335 -32400 # Node ID 61a99993f8a75be2cd8d869da72573f605b4e0b0 # Parent 0142b59f5743eff0c795377f49c0eb09067cf152 largefiles: remove useless overrideupdate Now, "overrideupdate()" wrapping "hg update" is useless, because "workingctx.dirty() and raising Abort" in "hg update" was replaced by "cmdutil.bailifchanged()" in the previous patch, and the latter can detect changes of largefiles in the working directory. diff -r 0142b59f5743 -r 61a99993f8a7 hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py Wed Mar 25 13:55:35 2015 +0900 +++ b/hgext/largefiles/overrides.py Wed Mar 25 13:55:35 2015 +0900 @@ -409,36 +409,6 @@ else: orig(ui, repo, *pats, **opts) -# Override needs to refresh standins so that update's normal merge -# will go through properly. Then the other update hook (overriding repo.update) -# will get the new files. Filemerge is also overridden so that the merge -# will merge standins correctly. -def overrideupdate(orig, ui, repo, *pats, **opts): - # Need to lock between the standins getting updated and their - # largefiles getting updated - wlock = repo.wlock() - try: - if opts['check']: - lfdirstate = lfutil.openlfdirstate(ui, repo) - unsure, s = lfdirstate.status( - match_.always(repo.root, repo.getcwd()), - [], False, False, False) - - mod = len(s.modified) > 0 - for lfile in unsure: - standin = lfutil.standin(lfile) - if repo['.'][standin].data().strip() != \ - lfutil.hashfile(repo.wjoin(lfile)): - mod = True - else: - lfdirstate.normal(lfile) - lfdirstate.write() - if mod: - raise util.Abort(_('uncommitted changes')) - return orig(ui, repo, *pats, **opts) - finally: - wlock.release() - # Before starting the manifest merge, merge.updates will call # _checkunknownfile to check if there are any files in the merged-in # changeset that collide with unknown files in the working copy. diff -r 0142b59f5743 -r 61a99993f8a7 hgext/largefiles/uisetup.py --- a/hgext/largefiles/uisetup.py Wed Mar 25 13:55:35 2015 +0900 +++ b/hgext/largefiles/uisetup.py Wed Mar 25 13:55:35 2015 +0900 @@ -76,8 +76,6 @@ entry[1].extend(summaryopt) cmdutil.summaryremotehooks.add('largefiles', overrides.summaryremotehook) - entry = extensions.wrapcommand(commands.table, 'update', - overrides.overrideupdate) entry = extensions.wrapcommand(commands.table, 'pull', overrides.overridepull) pullopt = [('', 'all-largefiles', None,