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

            Bug ID: 6491
           Summary: Repository in a state where files are erroneously
                    identified as missing
           Product: Mercurial
           Version: 5.6.1
          Hardware: PC
                OS: Other
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzi...@mercurial-scm.org
          Reporter: mercur...@mbox.tinloaf.de
                CC: mercurial-devel@mercurial-scm.org
    Python Version: ---

I managed to get a mercurial repository into a state where a bunch of files
(which exist on disk) are detected as missing, and there seems to be no way of
"bringing them back" (at least as far as mercurial is considered). I suspect
that this could be caused by accessing the same repository (as in: the very
same folder on the disk) both from Windows and Linux (inside a WSL 1
container). My Windows mercurial version is 5.6.1, the Linux mercurial version
is 5.3.1.

The repository is in this weird state (from the Windows side of things):

PS D:\development\DEFAULT\efa> hg status

PS D:\development\DEFAULT\efa> hg status -d | Measure-Object -line

Lines Words Characters Property
----- ----- ---------- --------
  101


So, `status` just says nothing, but `status -d` finds 101 missing files.
Weirdly, the Linux client does not see any missing files:

lba@One:~/dev/DEFAULT/efa$ hg status -d | wc -l
0


Okay, just restore by `update -C` (on the Windows side):


PS D:\development\DEFAULT\efa> hg update -C
101 files updated, 0 files merged, 0 files removed, 0 files unresolved
updated to "9a390e7aae73: fixed"
1 other heads for branch "default"


However, the files are still missing:


PS D:\development\DEFAULT\efa> hg status -d | Measure-Object -line

Lines Words Characters Property
----- ----- ---------- --------
  101


In fact, I can run `hg update -C` multiple times successively, and it always
claims to update those 101 files:


PS D:\development\DEFAULT\efa> hg up -C
101 files updated, 0 files merged, 0 files removed, 0 files unresolved
updated to "9a390e7aae73: fixed"
1 other heads for branch "default"
PS D:\development\DEFAULT\efa> hg up -C
101 files updated, 0 files merged, 0 files removed, 0 files unresolved
updated to "9a390e7aae73: fixed"
1 other heads for branch "default"


To make things ever weirder, the files are actually there:


PS D:\development\DEFAULT\efa> hg status -d | select -first 1
! build\docker\Dockerfile
PS D:\development\DEFAULT\efa> ls .\build\docker\Dockerfile


    Directory: D:\development\DEFAULT\efa\build\docker


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         2/23/2021  12:29 PM            641 Dockerfile


I've tried the following three suggestions (by marmoute and nbjoerg in the IRC
channel), without luck:

* hg up -r null ; hg up 
* hg debugrebuilddirstate ; hg up -C
* rm .\hg\wcache\* ; hg up -C

All of them result in the same situation as outlined above.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to