Patchwork largefiles: include largefiles when doing log on a directory (issue4241)

login
register
mail settings
Submitter Mads Kiilerich
Date May 8, 2014, 5:45 p.m.
Message ID <e7cb8f74c85ec66cbd4d.1399571156@localhost.localdomain>
Download mbox | patch
Permalink /patch/4674/
State Accepted
Commit c7e9fb881a5a2e1934550e957598783e7ca96572
Headers show

Comments

Mads Kiilerich - May 8, 2014, 5:45 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1399571122 -7200
#      Thu May 08 19:45:22 2014 +0200
# Node ID e7cb8f74c85ec66cbd4d1f7017c9a1cdf9557eff
# Parent  62a2749895e4151f766a4243fa870b1ddd7386d0
largefiles: include largefiles when doing log on a directory (issue4241)

The matchers _files had to include both the real root and the standin version
of the root.
Pierre-Yves David - May 9, 2014, 4:16 p.m.
On 05/08/2014 10:45 AM, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1399571122 -7200
> #      Thu May 08 19:45:22 2014 +0200
> # Node ID e7cb8f74c85ec66cbd4d1f7017c9a1cdf9557eff
> # Parent  62a2749895e4151f766a4243fa870b1ddd7386d0
> largefiles: include largefiles when doing log on a directory (issue4241)

This one is queued thanks

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -282,6 +282,8 @@  def overridelog(orig, ui, repo, *pats, *
             standin = lfutil.standin(m._files[i])
             if standin in repo[ctx.node()]:
                 m._files[i] = standin
+            elif m._files[i] not in repo[ctx.node()]:
+                m._files.append(standin)
             pats.add(standin)
 
         m._fmap = set(m._files)
diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
--- a/tests/test-largefiles.t
+++ b/tests/test-largefiles.t
@@ -390,6 +390,14 @@  Committing directories containing only l
   A sub2/large7
   A z/y/x/large2
   A z/y/x/m/large1
+
+(and a bit of log testing)
+
+  $ hg log -T '{rev}\n' z/y/x/m/large1
+  7
+  $ hg log -T '{rev}\n' z/y/x/m  # with only a largefile
+  7
+
   $ hg rollback --quiet
   $ touch z/y/x/m/normal
   $ hg add z/y/x/m/normal