[Bug 4236] New: hg log on a normal file aborts with the largefiles extension enabled

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Thu May 1 00:15:33 CDT 2014


http://bz.selenic.com/show_bug.cgi?id=4236

          Priority: normal
            Bug ID: 4236
                CC: mercurial-devel at selenic.com, natosha at gmail.com
          Assignee: bugzilla at selenic.com
           Summary: hg log on a normal file aborts with the largefiles
                    extension enabled
          Severity: bug
    Classification: Unclassified
                OS: All
          Reporter: matt_harbison at yahoo.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: 3.0-rc
         Component: largefiles
           Product: Mercurial

I ran the test suite like so, to see where the largefiles extension diverges
from when it isn't loaded:

  $ run-tests.py -l --extra-config-opt extensions.largefiles= test-glog.t

and got several changes.  The first thing I noticed was the path in the abort
message would change from run to run, and sometimes the path didn't look
reasonable.  This appears to be caused by the order of the entries in the set
'pats' in largefiles.overrides.overridelog() changing from run to run- it
appears that it gets 2 entries for each file listed on the command line.

I "fixed" the bad path by changing this line in overridelog():

            pats.update(back + lfutil.standin(m._cwd + '/' + f) for f in p)

to:
            pats.update(m._root + '/' + lfutil.standin(f) for f in p)

but it still complained about the .hglf/<file> missing for these normal files. 
Maybe it shouldn't be adding a standin file when the item isn't a largefile?


The culprit is this commit from a couple of weeks ago.  Reverting it yields a
clean run on test-glog.t.

  changeset:   21134:49e13e76ec5a
  user:        Lucas Moscovicz <lmoscovicz at fb.com>
  date:        Wed Mar 05 15:55:09 2014 -0800
  summary:     largefiles: changed overridelog to work with graphlog


The initial diff against e9c2f76be74b (the latest stable without the "fix") is
this:

diff --git a/tests/test-glog.t b/tests/test-glog.t
--- a/tests/test-glog.t
+++ b/tests/test-glog.t
@@ -1138,22 +1138,14 @@

 From outer space:
   $ hg log -G -l1 repo
-  @  changeset:   34:fea3ac5810e0
-  |  tag:         tip
-  |  parent:      32:d06dffa21a31
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:34 1970 +0000
-  |  summary:     (34) head
-  |
+  abort: ../.hglf/$TESTTMP/repo not under root '$TESTTMP\repo'
+  [255]
   $ hg log -G -l1 repo/a
-  @  changeset:   34:fea3ac5810e0
-  |  tag:         tip
-  |  parent:      32:d06dffa21a31
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:34 1970 +0000
-  |  summary:     (34) head
-  |
+  abort: ../.hglf/$TESTTMP/repo/a not under root '$TESTTMP\repo'
+  [255]
   $ hg log -G -l1 repo/missing
+  abort: ../.hglf/$TESTTMP/repo/missing not under root '$TESTTMP\repo'
+  [255]

 #endif

@@ -1858,76 +1850,17 @@
   |

   $ hg log -G --git --patch --follow b
-  o  changeset:   1:216d4c92cf98
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     copy a b
-  |
-  |  diff --git a/a b/b
-  |  copy from a
-  |  copy to b
-  |
-  o  changeset:   0:f8035bb17114
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     add a
-  
-     diff --git a/a b/a
-     new file mode 100644
-     --- /dev/null
-     +++ b/a
-     @@ -0,0 +1,1 @@
-     +a
-  
+  abort: .hglf/b at 5918b8d165d1: not found in manifest!
+  [255]

   $ hg log -G --git --stat --follow b
-  o  changeset:   1:216d4c92cf98
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     copy a b
-  |
-  |   b |  0
-  |   1 files changed, 0 insertions(+), 0 deletions(-)
-  |
-  o  changeset:   0:f8035bb17114
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     add a
-  
-      a |  1 +
-      1 files changed, 1 insertions(+), 0 deletions(-)
-  
+  abort: .hglf/b at 5918b8d165d1: not found in manifest!
+  [255]

   $ hg up -q 6
   $ hg log -G --git --patch --follow-first e
-  @    changeset:   6:fc281d8ff18d
-  |\   tag:         tip
-  | |  parent:      5:99b31f1c2782
-  | |  parent:      4:17d952250a9d
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     merge 5 and 4
-  | |
-  | |  diff --git a/e b/e
-  | |  --- a/e
-  | |  +++ b/e
-  | |  @@ -1,1 +1,1 @@
-  | |  -ee
-  | |  +merge
-  | |
-  o |  changeset:   5:99b31f1c2782
-  | |  parent:      3:5918b8d165d1
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     add another e
-  | |
-  | |  diff --git a/e b/e
-  | |  new file mode 100644
-  | |  --- /dev/null
-  | |  +++ b/e
-  | |  @@ -0,0 +1,1 @@
-  | |  +ee
-  | |
+  abort: .hglf/e at fc281d8ff18d: not found in manifest!
+  [255]

 Test old-style --rev


A subsequent run then yielded this diff, without any code changes (and without
the m._root + ... "fix"):

$ ./run-tests.py -l -i --extra-config-opt extensions.largefiles= test-glog.t

--- c:\Users\Matt\Projects\hg\tests\test-glog.t
+++ c:\Users\Matt\Projects\hg\tests\test-glog.t.err
@@ -1138,13 +1138,13 @@

 From outer space:
   $ hg log -G -l1 repo
-  abort: ../.hglf/$TESTTMP/repo not under root '$TESTTMP\repo'
+  abort: .hglf/. not under root '$TESTTMP\repo'
   [255]
   $ hg log -G -l1 repo/a
-  abort: ../.hglf/$TESTTMP/repo/a not under root '$TESTTMP\repo'
+  abort: .hglf/a not under root '$TESTTMP\repo'
   [255]
   $ hg log -G -l1 repo/missing
-  abort: ../.hglf/$TESTTMP/repo/missing not under root '$TESTTMP\repo'
+  abort: .hglf/missing not under root '$TESTTMP\repo'
   [255]

 #endif

ERROR: test-glog.t output changed

It switches back and forth between the different paths pretty regularly.  I
also reproduced this on Fedora 16.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list