Patchwork largefiles: remove 'forget' list that's always empty

login
register
mail settings
Submitter Martin von Zweigbergk
Date Oct. 2, 2014, 12:11 a.m.
Message ID <7f9bbd6c0529f09b8f9e.1412208660@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6079/
State Accepted
Headers show

Comments

Martin von Zweigbergk - Oct. 2, 2014, 12:11 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@gmail.com>
# Date 1412112769 25200
#      Tue Sep 30 14:32:49 2014 -0700
# Node ID 7f9bbd6c0529f09b8f9e5a00d1d599002523a982
# Parent  4a00110fd8708373ed8e69f96367383b2dd10661
largefiles: remove 'forget' list that's always empty
Mads Kiilerich - Oct. 2, 2014, 12:31 a.m.
On 10/02/2014 02:11 AM, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@gmail.com>
> # Date 1412112769 25200
> #      Tue Sep 30 14:32:49 2014 -0700
> # Node ID 7f9bbd6c0529f09b8f9e5a00d1d599002523a982
> # Parent  4a00110fd8708373ed8e69f96367383b2dd10661
> largefiles: remove 'forget' list that's always empty

Heh - someone forgot it. LGTM.

/Mads
Matt Mackall - Oct. 2, 2014, 6:42 p.m.
On Wed, 2014-10-01 at 17:11 -0700, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@gmail.com>
> # Date 1412112769 25200
> #      Tue Sep 30 14:32:49 2014 -0700
> # Node ID 7f9bbd6c0529f09b8f9e5a00d1d599002523a982
> # Parent  4a00110fd8708373ed8e69f96367383b2dd10661
> largefiles: remove 'forget' list that's always empty

Queued for default, thanks.
Augie Fackler - Oct. 2, 2014, 6:43 p.m.
On Wed, Oct 01, 2014 at 05:11:00PM -0700, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@gmail.com>
> # Date 1412112769 25200
> #      Tue Sep 30 14:32:49 2014 -0700
> # Node ID 7f9bbd6c0529f09b8f9e5a00d1d599002523a982
> # Parent  4a00110fd8708373ed8e69f96367383b2dd10661
> largefiles: remove 'forget' list that's always empty

queued per mads's lgtm

>
> diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
> --- a/hgext/largefiles/overrides.py
> +++ b/hgext/largefiles/overrides.py
> @@ -163,17 +163,17 @@
>      result = 0
>
>      if after:
> -        remove, forget = deleted, []
> +        remove = deleted
>          result = warn(modified + added + clean,
>                        _('not removing %s: file still exists\n'))
>      else:
> -        remove, forget = deleted + clean, []
> +        remove = deleted + clean
>          result = warn(modified, _('not removing %s: file is modified (use -f'
>                                    ' to force removal)\n'))
>          result = warn(added, _('not removing %s: file has been marked for add'
>                                 ' (use forget to undo)\n')) or result
>
> -    for f in sorted(remove + forget):
> +    for f in sorted(remove):
>          if ui.verbose or not m.exact(f):
>              ui.status(_('removing %s\n') % m.rel(f))
>
> @@ -191,9 +191,7 @@
>                  util.unlinkpath(repo.wjoin(f), ignoremissing=True)
>              lfdirstate.remove(f)
>          lfdirstate.write()
> -        forget = [lfutil.standin(f) for f in forget]
>          remove = [lfutil.standin(f) for f in remove]
> -        repo[None].forget(forget)
>          # If this is being called by addremove, let the original addremove
>          # function handle this.
>          if not getattr(repo, "_isaddremove", False):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
Augie Fackler - Oct. 2, 2014, 6:57 p.m.
On Thu, Oct 02, 2014 at 01:42:07PM -0500, Matt Mackall wrote:
> On Wed, 2014-10-01 at 17:11 -0700, Martin von Zweigbergk wrote:
> > # HG changeset patch
> > # User Martin von Zweigbergk <martinvonz@gmail.com>
> > # Date 1412112769 25200
> > #      Tue Sep 30 14:32:49 2014 -0700
> > # Node ID 7f9bbd6c0529f09b8f9e5a00d1d599002523a982
> > # Parent  4a00110fd8708373ed8e69f96367383b2dd10661
> > largefiles: remove 'forget' list that's always empty
>
> Queued for default, thanks.

I'll drop mine then.

>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -163,17 +163,17 @@ 
     result = 0
 
     if after:
-        remove, forget = deleted, []
+        remove = deleted
         result = warn(modified + added + clean,
                       _('not removing %s: file still exists\n'))
     else:
-        remove, forget = deleted + clean, []
+        remove = deleted + clean
         result = warn(modified, _('not removing %s: file is modified (use -f'
                                   ' to force removal)\n'))
         result = warn(added, _('not removing %s: file has been marked for add'
                                ' (use forget to undo)\n')) or result
 
-    for f in sorted(remove + forget):
+    for f in sorted(remove):
         if ui.verbose or not m.exact(f):
             ui.status(_('removing %s\n') % m.rel(f))
 
@@ -191,9 +191,7 @@ 
                 util.unlinkpath(repo.wjoin(f), ignoremissing=True)
             lfdirstate.remove(f)
         lfdirstate.write()
-        forget = [lfutil.standin(f) for f in forget]
         remove = [lfutil.standin(f) for f in remove]
-        repo[None].forget(forget)
         # If this is being called by addremove, let the original addremove
         # function handle this.
         if not getattr(repo, "_isaddremove", False):