2

Today I noticed a few files on my Ubuntu and Mac machines that seem to be missing in the Mercurial working directory on my Windows machine.

I'm using Mercurial to keep a folder synchronized between several machines.

Whenever anyone improves any of the files in that folder or adds more files into that folder, I want every one of these machines to be updated with the new and improved files.

I did a "push" and a "pull" and an "update" on every laptop to synchronize them with the server (and a "update" on the server), and I checked that the working directory was "clean". So I expected every sub-folder in the working directory to at least have the same number of files on every machine. But what I see is that the Mac and Ubuntu have a dozen files in one particular sub-folder in their working directory -- so apparently Mercurial successfully updated the new files when they were added to one of those machines and copied those new files to the other machine -- but the Windows machine has only 3 files in that sub-folder.

In the Window 7 file manager "Folder Options >> View", I have "Show hidden files, folders, and drives" enabled.

  • On the Ubuntu 14 server, I'm using TortoiseHg.
  • On the Ubuntu 14 laptop, I'm using TortoiseHg.
  • On the Mac OS X laptop, I'm using SourceTree.
  • On the Windows 7 laptop, I had an older version of TortoiseHg and recently upgraded TortoiseHg to version 3.5.2.
  • The repository itself was initially created in 2012 on a machine that was repurposed and its hard drives wiped a few years ago. (It was probably running Windows XP).

What should I do to write a good bug report about this "missing files" problem I'm seeing?

2 Answers 2

0
  • For new added files, you have to manually hg add files to the repo
  • For added|changed files you have hg commit before push
  • hgignore (in common case) is location-specific file, not stored (and not published) file, it's content may differ and thus different set files will be ignored on different hosts (hg add without parameters may produce different results): check hg status for repo with unique files
0

I know this is an old question, but perhaps this will help somebody else.

I had the same issue: a file was tracked, but on one machine hg pull && hg up did not actually create the file on the disk.

Checking the file in the repository browser (using Tortoise HG) showed it as tracked, however HG refused to create the actual file on disk.

The solution was to make a fresh clone of the repository in question.

If for some reason you cannot afford to make a clean fresh clone (like a time-consuming local-reconfiguration of a large project), the following workaround should fix the issue:

  1. Close any and all applications that may be working with the repository or any of the tracked files (IDEs, Tortoise HG, etc).
  2. From the problem repository, move the .hg directory to some other place.
  3. Make a fresh clone of the repository in a new directory.
  4. Copy the .hg directory from the new cloned repository to the old repository.
  5. Run hg up in the old repository (and change the branch if needed).

This should recreate any missing files on the disk.

Delete the backup .hg directory that was moved from the old repository and the new repository clone when everything seems in order with your files.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .