Mercurial > hg
changeset 24474:61a99993f8a7
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.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 25 Mar 2015 13:55:35 +0900 |
parents | 0142b59f5743 |
children | 06cbff4674a3 |
files | hgext/largefiles/overrides.py hgext/largefiles/uisetup.py |
diffstat | 2 files changed, 0 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- 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,