1

I have a mercurial repository that I managed to get into a weird state. I suspect the culprit is the fact that I used the repository (as in: the same folder on my disk) with both the Windows and Linux hg clients (using WSL 1 on a Windows machine). I realize that at this point a fresh clone would probably be the best and easiest solution, but I have some un-pushed work in a bookmark which I would rather not lose. I know I can export a patch and re-apply it later on my new clone, but I still hope there might be an easier solution.

The repository is in this weird state:

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 seem to be 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

Any guesses what's going on here?

2
  • Wish I could answer this... have never tried this kind of configuration. I wonder if using hg share to, well, share the repository between windows & linux would be a good alternative. Commented Feb 23, 2021 at 19:54
  • You might consider asking (flagging) this question to be moved to stackoverflow, there are many many more hg questions there, and you might be more likely to get a good answer. Commented Feb 23, 2021 at 19:55

0

You must log in to answer this question.

Browse other questions tagged .