# HG changeset patch # User Martin Geisler # Date 1326030620 -3600 # Node ID 07b6af9076b4458f41d9cbeb5ae6d2b85b02bd34 # Parent acb0a40fa14d6f64e42c56b0b8c1a9e354976341# Parent 0c7b83a057aad73e85b72e685b9beee4e5da7d6a merge with stable diff -r acb0a40fa14d -r 07b6af9076b4 hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py Sat Jan 07 23:37:19 2012 +0100 +++ b/hgext/largefiles/overrides.py Sun Jan 08 14:50:20 2012 +0100 @@ -130,7 +130,7 @@ orig(ui, repo, *pats, **opts) restorematchfn() - after, force = opts.get('after'), opts.get('force') + after = opts.get('after') if not pats and not after: raise util.Abort(_('no files specified')) m = scmutil.match(repo[None], pats, opts) @@ -145,12 +145,10 @@ def warn(files, reason): for f in files: - ui.warn(_('not removing %s: %s (use -f to force removal)\n') + ui.warn(_('not removing %s: %s (use forget to undo)\n') % (m.rel(f), reason)) - if force: - remove, forget = modified + deleted + clean, added - elif after: + if after: remove, forget = deleted, [] warn(modified + added + clean, _('file still exists')) else: @@ -839,7 +837,11 @@ ui.status('\n') def override_summary(orig, ui, repo, *pats, **opts): - orig(ui, repo, *pats, **opts) + try: + repo.lfstatus = True + orig(ui, repo, *pats, **opts) + finally: + repo.lfstatus = False if opts.pop('large', None): toupload = getoutgoinglfiles(ui, repo, None, **opts) diff -r acb0a40fa14d -r 07b6af9076b4 tests/test-largefiles.t --- a/tests/test-largefiles.t Sat Jan 07 23:37:19 2012 +0100 +++ b/tests/test-largefiles.t Sun Jan 08 14:50:20 2012 +0100 @@ -17,7 +17,8 @@ > EOF Create the repo with a couple of revisions of both large and normal -files, testing that status correctly shows largefiles. +files, testing that status correctly shows largefiles and that summary output +is correct. $ hg init a $ cd a @@ -38,7 +39,20 @@ M normal1 M sub/large2 M sub/normal2 + $ hg sum + parent: 0:30d30fe6a5be tip + add files + branch: default + commit: 4 modified + update: (current) $ hg commit -m "edit files" + $ hg sum --large + parent: 1:ce8896473775 tip + edit files + branch: default + commit: (clean) + update: (current) + largefiles: No remote repo Commit preserved largefile contents. @@ -57,6 +71,18 @@ $ hg commit -m "remove files" $ ls sub + $ echo "testlargefile" > large1-test + $ hg add --large large1-test + $ hg st + A large1-test + $ hg rm large1-test + not removing large1-test: file has been marked for add (use forget to undo) + $ hg st + A large1-test + $ hg forget large1-test + $ hg st + ? large1-test + $ rm large1-test Copy both largefiles and normal files (testing that status output is correct).