Bug 3228 - Largefiles-enabled subrepo breaks hg summary in toplevel repo
Summary: Largefiles-enabled subrepo breaks hg summary in toplevel repo
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
: 3415 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-30 01:31 UTC by mindajar
Modified: 2012-05-13 05:03 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mindajar 2012-01-30 01:31 UTC
$ hg init summary-subrepo
$ cd summary-subrepo/
$ hg init subrepo
$ echo 'subrepo = subrepo' > .hgsub
$ hg add .hgsub
$ hg commit -m 'initial revision'
committing subrepository subrepo
$ cd subrepo
$ dd if=/dev/zero of=bigfile bs=1k count=10
10+0 records in
10+0 records out
10240 bytes transferred in 0.000073 secs (140358408 bytes/sec)
$ hg add --large bigfile
$ hg commit -m 'initial revision in subrepo'
$ cd ..
$ hg summary
parent: 0:f8dbc4c17b7c tip
 initial revision
branch: default
** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) [GCC 4.2.1 (Based on Apple 
Inc. build 5658) (LLVM build 2335.15.00)]
** Mercurial Distributed SCM (version 2.1-rc+52-eb85d5f89fef)
** Extensions loaded: largefiles
Traceback (most recent call last):
  File "/usr/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/Library/Python/2.7/site-packages/mercurial/dispatch.py", line 27, in 
run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/Library/Python/2.7/site-packages/mercurial/dispatch.py", line 64, in 
dispatch
    return _runcatch(req)
  File "/Library/Python/2.7/site-packages/mercurial/dispatch.py", line 87, in 
_runcatch
    return _dispatch(req)
  File "/Library/Python/2.7/site-packages/mercurial/dispatch.py", line 683, in 
_dispatch
    cmdpats, cmdoptions)
  File "/Library/Python/2.7/site-packages/mercurial/dispatch.py", line 465, in 
runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/Library/Python/2.7/site-packages/mercurial/dispatch.py", line 737, in 
_runcommand
    return checkargs()
  File "/Library/Python/2.7/site-packages/mercurial/dispatch.py", line 691, in 
checkargs
    return cmdfunc()
  File "/Library/Python/2.7/site-packages/mercurial/dispatch.py", line 680, in 
<lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/Library/Python/2.7/site-packages/mercurial/util.py", line 456, in 
check
    return func(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/mercurial/extensions.py", line 139, 
in wrap
    util.checksignature(origfn), *args, **kwargs)
  File "/Library/Python/2.7/site-packages/mercurial/util.py", line 456, in 
check
    return func(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/hgext/largefiles/overrides.py", line 
883, in override_summary
    orig(ui, repo, *pats, **opts)
  File "/Library/Python/2.7/site-packages/mercurial/util.py", line 456, in 
check
    return func(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/mercurial/commands.py", line 5352, 
in summary
    subs = [s for s in ctx.substate if ctx.sub(s).dirty()]
  File "/Library/Python/2.7/site-packages/mercurial/util.py", line 237, in 
__get__
    result = self.func(obj)
  File "/Library/Python/2.7/site-packages/mercurial/context.py", line 79, in 
substate
    return subrepo.state(self, self._repo.ui)
  File "/Library/Python/2.7/site-packages/mercurial/subrepo.py", line 38, in 
state
    read('.hgsub')
  File "/Library/Python/2.7/site-packages/mercurial/subrepo.py", line 26, in 
read
    data = ctx[f].data()
  File "/Library/Python/2.7/site-packages/mercurial/context.py", line 85, in 
__getitem__
    return self.filectx(key)
  File "/Library/Python/2.7/site-packages/hgext/largefiles/reposetup.py", line 
67, in filectx
    fileid, filelog)
TypeError: filectx() takes at most 3 arguments (4 given)
$
Comment 1 Na'Tosha Bard 2012-05-11 06:02 UTC
I just tested this against the current default tip () and it works correctly:

   $ hg commit -m 'initial revision'
   $ cd subrepo
   $ dd if=/dev/zero of=bigfile bs=1k count=10
   10+0 records in
   10+0 records out
   10240 bytes transferred in 0.000069 secs (148614785 bytes/sec)
   $ hg add --large bigfile
   $ hg commit -m 'initial revision in subrepo'
   $ cd ..
   $ hg summary
   parent: 0:f115377de0ac tip
   initial revision
   branch: default
   commit: 1 subrepos
   update: (current)

It seems to have been fixed by http://selenic.com/hg/rev/12dabc22de77 which
should be available in the 2.2 release.  Please upgrade your Mercurial.
Comment 2 Bugzilla 2012-05-12 09:27 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:27 EDT  ---

This bug was previously known as _bug_ 3227 at http://mercurial.selenic.com/bts/issue3227
Comment 3 gidyn 2012-05-12 14:37 UTC
*** Bug 3415 has been marked as a duplicate of this bug. ***