Patchwork [7,of,7] context.status: only filter suspect symlinks in the dirstate status

login
register
mail settings
Submitter Martin von Zweigbergk
Date Nov. 2, 2014, 10:13 p.m.
Message ID <56e742cf0a4483003084.1414966431@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6540/
State Accepted
Commit 18168938e1c12d95e1b208caffbf1c79f0cf9f19
Headers show

Comments

Martin von Zweigbergk - Nov. 2, 2014, 10:13 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1414108838 25200
#      Thu Oct 23 17:00:38 2014 -0700
# Branch stable
# Node ID 56e742cf0a448300308458166eabb623dfdf0217
# Parent  38535ef5532437be7eb415ace3122034d7a0fbf2
context.status: only filter suspect symlinks in the dirstate status

We don't care about filtering out symlinks that have already been
committed with full content, only those that have been accidentally
resolved in the working directory.
Sean Farley - Nov. 3, 2014, 6:43 p.m.
Martin von Zweigbergk writes:

> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1414108838 25200
> #      Thu Oct 23 17:00:38 2014 -0700
> # Branch stable
> # Node ID 56e742cf0a448300308458166eabb623dfdf0217
> # Parent  38535ef5532437be7eb415ace3122034d7a0fbf2
> context.status: only filter suspect symlinks in the dirstate status
>
> We don't care about filtering out symlinks that have already been
> committed with full content, only those that have been accidentally
> resolved in the working directory.

This one might be ok. Sid helped me with the filtering of symlinks on
FAT32 so his opinion should override mine.
Pierre-Yves David - Nov. 8, 2014, 12:07 a.m.
On 11/03/2014 06:43 PM, Sean Farley wrote:
>
> Martin von Zweigbergk writes:
>
>> # HG changeset patch
>> # User Martin von Zweigbergk <martinvonz@google.com>
>> # Date 1414108838 25200
>> #      Thu Oct 23 17:00:38 2014 -0700
>> # Branch stable
>> # Node ID 56e742cf0a448300308458166eabb623dfdf0217
>> # Parent  38535ef5532437be7eb415ace3122034d7a0fbf2
>> context.status: only filter suspect symlinks in the dirstate status

The whole series have been pushed to the clowncopter, thanks.

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1424,14 +1424,14 @@ 
         against its parent (repo['.']).
         """
         s = self._dirstatestatus(match, listignored, listclean, listunknown)
+        # Filter out symlinks that, in the case of FAT32 and NTFS filesytems,
+        # might have accidentally ended up with the entire contents of the file
+        # they are susposed to be linking to.
+        s[0] = self._filtersuspectsymlink(s[0])
         if other != self._repo['.']:
             s = super(workingctx, self)._buildstatus(other, s, match,
                                                      listignored, listclean,
                                                      listunknown)
-        # Filter out symlinks that, in the case of FAT32 and NTFS filesytems,
-        # might have accidentally ended up with the entire contents of the file
-        # they are susposed to be linking to.
-        s[0] = self._filtersuspectsymlink(s[0])
         self._status = scmutil.status(*s)
         return s