1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #3336 wontfix

File changed in background can break repository

Dmitry Grudinin
created an issue

Working with repo under OwnCloud Windows Desktop client (http://owncloud.org/sync-clients/) causes broken files. Repository recovery don't work. The only way to fix repo — remove local copy & clone it again.

Bug report message:

#!python
    ** Mercurial version (2.7).  TortoiseHg version (2.9)
    ** Command: 
    ** CWD: C:\Windows
    ** Encoding: cp1251
    ** 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.10.2 QScintilla-2.7.2
    Traceback (most recent call last):
      File "tortoisehg\hgqt\chunks.pyo", line 143, in timerEvent
    AttributeError: 'ChunksWidget' object has no attribute 'ctx'
    Traceback (most recent call last):
      File "tortoisehg\hgqt\chunks.pyo", line 143, in timerEvent
    AttributeError: 'ChunksWidget' object has no attribute 'ctx'

Example of output with error:

% hg update --config ui.merge=internal:fail --rev tip --clean
abort: ***/index.html.i@69971cbe7493: no match found!
[command returned code 255 Mon Aug 26 19:14:52 2013]

Error message after click on "Shelve" menu item:

   #!python
    ** Mercurial version (2.7).  TortoiseHg version (2.9)
    ** Command: 
    ** CWD: C:\Windows
    ** Encoding: cp1251
    ** 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.10.2 QScintilla-2.7.2
    Traceback (most recent call last):
      File "tortoisehg\hgqt\workbench.pyo", line 960, in forwarder
      File "tortoisehg\hgqt\repowidget.pyo", line 827, in shelve
      File "tortoisehg\hgqt\qtlib.pyo", line 1251, in open
      File "tortoisehg\hgqt\qtlib.pyo", line 1271, in _preparedlg
      File "tortoisehg\hgqt\qtlib.pyo", line 1274, in _populatedlg
      File "tortoisehg\hgqt\repowidget.pyo", line 120, in <lambda>
      File "tortoisehg\hgqt\repowidget.pyo", line 830, in _createShelveDialog
      File "tortoisehg\hgqt\shelve.pyo", line 193, in __init__
      File "tortoisehg\hgqt\shelve.pyo", line 423, in refreshCombos
      File "tortoisehg\hgqt\shelve.pyo", line 442, in comboAChanged
      File "tortoisehg\hgqt\chunks.pyo", line 446, in setContext
      File "tortoisehg\hgqt\filelistview.pyo", line 60, in setContext
      File "tortoisehg\hgqt\filelistmodel.pyo", line 87, in setContext
      File "tortoisehg\hgqt\filelistmodel.pyo", line 169, in loadFiles
      File "tortoisehg\hgqt\filelistmodel.pyo", line 124, in _buildDesc
      File "mercurial\context.pyo", line 957, in files
      File "mercurial\util.pyo", line 277, in __get__
      File "mercurial\context.pyo", line 915, in _status
      File "mercurial\localrepo.pyo", line 1500, in status
      File "mercurial\context.pyo", line 557, in cmp
      File "mercurial\context.pyo", line 540, in size
      File "mercurial\util.pyo", line 277, in __get__
      File "mercurial\context.pyo", line 456, in _filerev
      File "mercurial\util.pyo", line 277, in __get__
      File "mercurial\context.pyo", line 450, in _filenode
      File "mercurial\revlog.pyo", line 799, in lookup
    LookupError: ***/index.html.i@69971cbe7493: no match found

Comments (3)

  1. Yuya Nishihara

    Is OwnCloud sync client robust enough to handle transactional data, e.g. MySQL database, without corruption?

    If not, you'll need to stop the sync client during repository operation, or exclude .hg directory from it.

  2. Steve Borho

    The same happens with Dropbox and other seamless cloud disks. Mercurial deals with the file system at a fairly low level and these network sync schemes generally fail at some point. The suggested solution is to use push/pull to communicate commits, and don't keep the repository on the network disk.

  3. Log in to comment