[Bug 5738] New: hg revert has problems with large files

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Fri Nov 10 19:40:05 UTC 2017


https://bz.mercurial-scm.org/show_bug.cgi?id=5738

            Bug ID: 5738
           Summary: hg revert has problems with large files
           Product: Mercurial
           Version: 4.4.1
          Hardware: Macintosh
                OS: Mac OS
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: largefiles
          Assignee: bugzilla at mercurial-scm.org
          Reporter: mojca at macports.org
                CC: mercurial-devel at mercurial-scm.org, natosha at gmail.com

First of all, please excuse me for being a total newbie with hg and I'm not
sure how to properly file a bug report or what to file at all.

Description:

I have a repository with large files and keep switching between Mac and Windows
VM. At some point I decided I wanted the files in a different subfolder (and
also accidentally used the wrong path separator as I was copy-pasting from
Windows). Once I noticed the problem, I tried to revert, to no avail.

Now I cannot find a way to revert the changes back.

Here's an attempt of reproducing the steps:

> mkdir TestRepo
> cd TestRepo
> hg init .
> mkdir DirA
> touch DirA/hello.txt
> touch DirA/world.txt
> hg add --large DirA/hello.txt
> hg add DirA/world.txt
> hg commit
> hg mv DirA DirA\DirB
moving DirA/world.txt to DirADirB/world.txt
moving .hglf/DirA/hello.txt to .hglf/DirADirB/DirA/hello.txt
> hg status
A DirADirB/DirA/hello.txt
A DirADirB/world.txt
R DirA/hello.txt
R DirA/world.txt
> find .
./DirADirB
./DirADirB/world.txt
./DirADirB/DirA
./DirADirB/DirA/hello.txt
> hg status -C
A DirADirB/DirA/hello.txt
  DirA/hello.txt
A DirADirB/world.txt
  DirA/world.txt
R DirA/hello.txt
R DirA/world.txt
> hg mv DirADirB/DirA/* DirA
> hg status
A DirA
A DirADirB/world.txt
R DirA/hello.txt
R DirA/world.txt
R DirADirB/DirA/hello.txt
> hg revert --all
forgetting .hglf/DirA
undeleting .hglf/DirA/hello.txt
undeleting DirA/world.txt
forgetting DirADirB/world.txt
abort: Not a directory: '/private/tmp/TestRepo/.hglf/DirA/hello.txt'


Trying to keep working on that repo (I tried reverting individual files) would
crash TornoiseHg (with a request to report to their bug tracker):

    #!python
    ** Mercurial version (4.3.1).  TortoiseHg version (4.3.1)
    ** Command: 
    ** CWD: /
    ** Encoding: US-ASCII
    ** Extensions loaded: largefiles, shelve
    ** Python version: 2.7.14 (default, Sep 30 2017, 11:56:16) [GCC 4.2.1
Compatible Apple LLVM 9.0.0 (clang-900.0.37)]
    ** System: Darwin xxx.local 17.2.0 Darwin Kernel Version 17.2.0: Fri Sep 29
18:27:05 PDT 2017; root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64
    ** Qt-4.8.7 PyQt-4.12.1 QScintilla-2.10.1
    Traceback (most recent call last):
      File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tortoisehg/hgqt/status.py",
line 394, in reloadComplete
        self.refthread.patchecked)
      File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tortoisehg/hgqt/status.py",
line 441, in updateModel
        self.updateCheckCount()
      File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tortoisehg/hgqt/status.py",
line 516, in updateCheckCount
        model.checkCount = len(self.getChecked())
      File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tortoisehg/hgqt/status.py",
line 548, in getChecked
        checked = model.getChecked()
      File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tortoisehg/hgqt/status.py",
line 1001, in getChecked
        assert len(self.checked) == len(self.unfiltered)
    AssertionError

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


More information about the Mercurial-devel mailing list