comparison hgext/largefiles/overrides.py @ 15788:07b6af9076b4

merge with stable
author Martin Geisler <mg@aragost.com>
date Sun, 08 Jan 2012 14:50:20 +0100
parents acb0a40fa14d 0c7b83a057aa
children 7cbba3adabc7
comparison
equal deleted inserted replaced
15785:acb0a40fa14d 15788:07b6af9076b4
128 manifest = repo[None].manifest() 128 manifest = repo[None].manifest()
129 installnormalfilesmatchfn(manifest) 129 installnormalfilesmatchfn(manifest)
130 orig(ui, repo, *pats, **opts) 130 orig(ui, repo, *pats, **opts)
131 restorematchfn() 131 restorematchfn()
132 132
133 after, force = opts.get('after'), opts.get('force') 133 after = opts.get('after')
134 if not pats and not after: 134 if not pats and not after:
135 raise util.Abort(_('no files specified')) 135 raise util.Abort(_('no files specified'))
136 m = scmutil.match(repo[None], pats, opts) 136 m = scmutil.match(repo[None], pats, opts)
137 try: 137 try:
138 repo.lfstatus = True 138 repo.lfstatus = True
143 if lfutil.standin(f) in manifest] 143 if lfutil.standin(f) in manifest]
144 for list in [s[0], s[1], s[3], s[6]]] 144 for list in [s[0], s[1], s[3], s[6]]]
145 145
146 def warn(files, reason): 146 def warn(files, reason):
147 for f in files: 147 for f in files:
148 ui.warn(_('not removing %s: %s (use -f to force removal)\n') 148 ui.warn(_('not removing %s: %s (use forget to undo)\n')
149 % (m.rel(f), reason)) 149 % (m.rel(f), reason))
150 150
151 if force: 151 if after:
152 remove, forget = modified + deleted + clean, added
153 elif after:
154 remove, forget = deleted, [] 152 remove, forget = deleted, []
155 warn(modified + added + clean, _('file still exists')) 153 warn(modified + added + clean, _('file still exists'))
156 else: 154 else:
157 remove, forget = deleted + clean, [] 155 remove, forget = deleted + clean, []
158 warn(modified, _('file is modified')) 156 warn(modified, _('file is modified'))
837 for file in toupload: 835 for file in toupload:
838 ui.status(lfutil.splitstandin(file) + '\n') 836 ui.status(lfutil.splitstandin(file) + '\n')
839 ui.status('\n') 837 ui.status('\n')
840 838
841 def override_summary(orig, ui, repo, *pats, **opts): 839 def override_summary(orig, ui, repo, *pats, **opts):
842 orig(ui, repo, *pats, **opts) 840 try:
841 repo.lfstatus = True
842 orig(ui, repo, *pats, **opts)
843 finally:
844 repo.lfstatus = False
843 845
844 if opts.pop('large', None): 846 if opts.pop('large', None):
845 toupload = getoutgoinglfiles(ui, repo, None, **opts) 847 toupload = getoutgoinglfiles(ui, repo, None, **opts)
846 if toupload is None: 848 if toupload is None:
847 ui.status(_('largefiles: No remote repo\n')) 849 ui.status(_('largefiles: No remote repo\n'))