1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #2546 duplicate

Error: patch cannot be decoded

Anonymous created an issue
** Mercurial version (2.4.2).  TortoiseHg version (2.6.2)
** Command: --nofork workbench
** CWD: C:\REPOSITORIES\AUDI\98
** Encoding: cp1252
** Extensions loaded: largefiles, mq
** Python version: 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
** Windows version: sys.getwindowsversion(major=5, minor=1, build=2600, platform=2, service_pack='Service Pack 3')
** Processor architecture: x86
** Qt-4.8.0 PyQt-4.9.1
Traceback (most recent call last):
  File "tortoisehg\hgqt\run.pyo", line 554, in __call__
  File "tortoisehg\hgqt\workbench.pyo", line 1286, in run
  File "tortoisehg\hgqt\workbench.pyo", line 600, in showRepo
  File "tortoisehg\hgqt\workbench.pyo", line 935, in _openRepo
  File "tortoisehg\hgqt\workbench.pyo", line 777, in addRepoTab
  File "tortoisehg\hgqt\repowidget.pyo", line 114, in __init__
  File "tortoisehg\hgqt\repowidget.pyo", line 1023, in loadSettings
  File "tortoisehg\hgqt\revdetails.pyo", line 307, in loadSettings
  File "tortoisehg\hgqt\csinfo.pyo", line 442, in set_expanded
  File "tortoisehg\hgqt\csinfo.pyo", line 426, in update
  File "tortoisehg\hgqt\csinfo.pyo", line 339, in get_markup
  File "tortoisehg\hgqt\csinfo.pyo", line 285, in get_markup
  File "tortoisehg\hgqt\csinfo.pyo", line 229, in get_data
  File "tortoisehg\hgqt\csinfo.pyo", line 181, in preset_func
  File "tortoisehg\util\hglib.pyo", line 193, in getctxtags
  File "tortoisehg\util\hglib.pyo", line 186, in getrawctxtags
  File "mercurial\context.pyo", line 937, in tags
  File "mercurial\context.pyo", line 197, in tags
  File "mercurial\localrepo.pyo", line 581, in nodetags
  File "mercurial\util.pyo", line 246, in __get__
  File "mercurial\localrepo.pyo", line 504, in _tagscache
  File "hgext\mq.pyo", line 3445, in _findtags
  File "mercurial\localrepo.pyo", line 541, in _findtags
  File "mercurial\tags.pyo", line 30, in findglobaltags
  File "mercurial\tags.pyo", line 247, in _readtagcache
  File "mercurial\context.pyo", line 272, in filenode
  File "mercurial\context.pyo", line 264, in _fileinfo
  File "mercurial\manifest.pyo", line 107, in find
  File "mercurial\revlog.pyo", line 914, in revision
mpatchError: patch cannot be decoded

Comments (6)

  1. Craig Millett

    I have run into the same thing. I try to load a repository in TortoiseHG and i get this:

    ** Mercurial version (2.5.4).  TortoiseHg version (2.7.2)
    ** Command: 
    ** CWD: C:\Windows\system32
    ** Encoding: cp1252
    ** Extensions loaded: 
    ** Python version: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
    ** Windows version: sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1')
    ** Processor architecture: x64
    ** Qt-4.8.4 PyQt-4.9.6 QScintilla-2.7
    Traceback (most recent call last):
      File "tortoisehg\hgqt\workbench.pyo", line 547, in openRepo
      File "tortoisehg\hgqt\workbench.pyo", line 917, in _openRepo
      File "tortoisehg\hgqt\workbench.pyo", line 759, in addRepoTab
      File "tortoisehg\hgqt\repowidget.pyo", line 113, in __init__
      File "tortoisehg\hgqt\repowidget.pyo", line 165, in setupUi
      File "tortoisehg\hgqt\repofilter.pyo", line 113, in __init__
      File "tortoisehg\hgqt\repofilter.pyo", line 312, in refresh
      File "tortoisehg\hgqt\repofilter.pyo", line 265, in _updatebranchfilter
      File "mercurial\util.pyo", line 246, in __get__
      File "tortoisehg\hgqt\thgrepo.pyo", line 451, in namedbranches
      File "mercurial\localrepo.pyo", line 657, in branchtags
      File "mercurial\localrepo.pyo", line 634, in branchmap
      File "mercurial\branchmap.pyo", line 80, in updatecache
      File "mercurial\branchmap.pyo", line 156, in update
      File "mercurial\changelog.pyo", line 349, in branch
      File "mercurial\changelog.pyo", line 282, in read
      File "mercurial\revlog.pyo", line 929, in revision
    mpatchError: patch cannot be decoded
    

    Also, I tried an hg pull from the command line and got this:

    searching for changes
    adding changesets
    transaction abort!
    rollback completed
    ** unknown exception encountered, please report by visiting
    ** http://mercurial.selenic.com/wiki/BugTracker
    ** Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
    ** Mercurial Distributed SCM (version 2.5.4)
    ** Extensions loaded:
    Traceback (most recent call last):
      File "hg", line 42, in <module>
      File "mercurial\dispatch.pyo", line 28, in run
      File "mercurial\dispatch.pyo", line 65, in dispatch
      File "mercurial\dispatch.pyo", line 88, in _runcatch
      File "mercurial\dispatch.pyo", line 743, in _dispatch
      File "mercurial\dispatch.pyo", line 514, in runcommand
      File "mercurial\dispatch.pyo", line 833, in _runcommand
      File "mercurial\dispatch.pyo", line 804, in checkargs
      File "mercurial\dispatch.pyo", line 740, in <lambda>
      File "mercurial\util.pyo", line 475, in check
      File "mercurial\commands.pyo", line 4743, in pull
      File "mercurial\localrepo.pyo", line 1699, in pull
      File "mercurial\localrepo.pyo", line 58, in wrapper
      File "mercurial\localrepo.pyo", line 2276, in addchangegroup
      File "mercurial\revlog.pyo", line 1241, in addgroup
      File "mercurial\revlog.pyo", line 1111, in _addrevision
      File "mercurial\revlog.pyo", line 1053, in buildtext
      File "mercurial\revlog.pyo", line 929, in revision
    mpatch.mpatchError: patch cannot be decoded
    

    FYI there was a patch created and used for this repository that was created and applied in SourceTree on a Mac.

  2. Craig Millett

    Updating to Tortoise 2.8 did not fix the issue

    ** Mercurial version (2.6).  TortoiseHg version (2.8)
    ** Command: 
    ** CWD: C:\Windows\system32
    ** Encoding: cp1252
    ** Extensions loaded: mercurial_keyring
    ** Python version: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
    ** Windows version: sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1')
    ** Processor architecture: x64
    ** Qt-4.8.4 PyQt-4.9.6 QScintilla-2.7
    Traceback (most recent call last):
      File "tortoisehg\hgqt\workbench.pyo", line 601, in openRepo
      File "tortoisehg\hgqt\workbench.pyo", line 985, in _openRepo
      File "tortoisehg\hgqt\workbench.pyo", line 807, in addRepoTab
      File "tortoisehg\hgqt\repowidget.pyo", line 116, in __init__
      File "tortoisehg\hgqt\repowidget.pyo", line 167, in setupUi
      File "tortoisehg\hgqt\repofilter.pyo", line 172, in __init__
      File "tortoisehg\hgqt\repofilter.pyo", line 433, in refresh
      File "tortoisehg\hgqt\repofilter.pyo", line 384, in _updateBranchFilter
      File "mercurial\util.pyo", line 277, in __get__
      File "tortoisehg\hgqt\thgrepo.pyo", line 449, in namedbranches
      File "mercurial\localrepo.pyo", line 659, in branchtags
      File "mercurial\localrepo.pyo", line 636, in branchmap
      File "mercurial\branchmap.pyo", line 80, in updatecache
      File "mercurial\branchmap.pyo", line 156, in update
      File "mercurial\changelog.pyo", line 349, in branch
      File "mercurial\changelog.pyo", line 282, in read
      File "mercurial\revlog.pyo", line 932, in revision
    mpatchError: patch cannot be decoded
    
  3. Craig Millett

    hg verify came back with some issues it found:

    checking changesets
     3640: unpacking changeset a32160b35ca6: patch cannot be decoded
    checking manifests
     manifest@?: rev 3621 points to unexpected changeset 3640
     manifest@?: 6fb65b90f0ad not in changesets
    crosschecking files in changesets and manifests
    checking files
     mobile/views/public_page/course_catalog.php@?: rev 39 points to unexpected chan
    geset 3640
     (expected )
    72019 files, 3641 changesets, 85940 total revisions
    1 warnings encountered!
    4 integrity errors encountered!
    (first damaged changeset appears to be 3640)
    

    There was some pretty crazy stuff that went on with this repository, and we don't want to deal with it anymore. We are moving our repository over to git, so we won't have to deal with this issue anymore...

  4. Log in to comment