Bug 4675 - comitting files larger than 2 gigs produces obscure error message
Summary: comitting files larger than 2 gigs produces obscure error message
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 3.3.3
Hardware: PC Windows
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-19 16:52 UTC by Clarence Weaver
Modified: 2015-06-11 00:00 UTC (History)
3 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 Clarence Weaver 2015-05-19 16:52 UTC
I get the following traceback with i try to commit a 2.47 GB zip file:

C:\Users\trr10\Documents\Projects>hg commit SoftwareTools
note: commit message saved in SoftwareTools\.hg\last-message.txt
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 3.3.3)
** Extensions loaded: convert
Traceback (most recent call last):
  File "hg", line 43, in <module>
  File "mercurial\dispatch.pyc", line 28, in run
  File "mercurial\dispatch.pyc", line 71, in dispatch
  File "mercurial\dispatch.pyc", line 140, in _runcatch
  File "mercurial\dispatch.pyc", line 844, in _dispatch
  File "mercurial\dispatch.pyc", line 863, in _dispatch
  File "mercurial\dispatch.pyc", line 624, in runcommand
  File "mercurial\dispatch.pyc", line 954, in _runcommand
  File "mercurial\dispatch.pyc", line 925, in checkargs
  File "mercurial\dispatch.pyc", line 860, in <lambda>
  File "mercurial\util.pyc", line 711, in check
  File "mercurial\commands.pyc", line 1505, in commit
  File "mercurial\cmdutil.pyc", line 2218, in commit
  File "mercurial\commands.pyc", line 1499, in commitfunc
  File "mercurial\localrepo.pyc", line 64, in wrapper
  File "mercurial\localrepo.pyc", line 1397, in commit
  File "mercurial\localrepo.pyc", line 64, in wrapper
  File "mercurial\localrepo.pyc", line 1455, in commitctx
  File "mercurial\localrepo.pyc", line 1240, in _filecommit
  File "mercurial\filelog.pyc", line 49, in add
  File "mercurial\revlog.pyc", line 1182, in addrevision
  File "mercurial\revlog.pyc", line 1319, in _addrevision
  File "mercurial\revlog.pyc", line 165, in packentry
struct.error: integer out of range for 'i' format code

C:\Users\trr10\Documents\Projects>
Comment 1 Matt Mackall 2015-05-19 17:21 UTC
There's currently a 2G limit:

http://mercurial.selenic.com/wiki/HandlingLargeFiles

Marking WONTFIX because it's not on any current roadmaps.
Comment 2 Jordi Gutiérrez Hermoso 2015-05-19 18:19 UTC
How about a pertinent error message instead?
Comment 3 Matt Mackall 2015-05-19 18:20 UTC
Go for it.
Comment 4 HG Bot 2015-06-03 16:45 UTC
Fixed by https://selenic.com/repo/hg/rev/eee88912db0a
Jordi Gutiérrez Hermoso <jordigh@octave.org>
revlog: raise an exception earlier if an entry is too large (issue4675)

Before we were relying on _pack to error out when trying to pass an
integer that was too large for the "i" format specifier. Now we check
this earlier so we can form a better error message.

The error message unfortunately must exclude the filename at this
level of the call stack. The problem is that this name is not
available here, and the error can be triggered by a large manifest or
by a large file itself. Although perhaps we could provide the name of
a revlog index file (from the revlog object, instead of the revlogio
object), this seems like too much leakage of internal data structures.
It's not ideal already that an error message even mentions revlogs,
but this does seem unavoidable here.

(please test the fix)
Comment 5 Bugzilla 2015-06-11 00:00 UTC
Bug was set to TESTING for 7 days, resolving