pushing error: empty or missing revlog for Mac/Contrib/PyIDE-src/Scripts/ Hold option to open a script
adrian at cadifra.com
Tue Jun 14 01:58:43 CDT 2011
On 2011-06-14 04:57, higery wrote:
> Explorer of Windows 7 has indeed the same problem as Vista.
> Mercurial already worked around this problem of Explorer by introducing
> a new repo format with version 1.7 (dotencode format) which encodes
> leading spaces inside .hg/store.
> Look into the file .hg/requires in your repo. If it contains
> then the repo is using the current latest format which is resilient
> against explorer of Vista and Windows 7 stripping leading spaces of
> Upgrading to a newer version of Mercurial will not change the format of
> your existing repos. So the best thing for you is using the latest
> version of Mercurial and converting your repos to the newest format.
> Conversion happens if you do 'hg clone --pull oldrepo newrepo'.
> Useful information!
> I'm at office now, and I have noticed that the leading spaces of file '
> _hold option to open a script~c2~8a.i' on this computer still exist,
> instead of being stripped. So I think if such problem is actually caused
> between copying repo from Win7 to WindowsXP.
No. It is much simpler. Explorer of Windows Vista and Windows 7 remove
leading spaces of files when they copy files. It has nothing to do with
If you have a repo that was created with Mercurial < 1.7 it may have
files with leading spaces inside .hg (provided someone committed a file
with a leading spaces in the past into the repo, which normally just
happens by error, so people usually rename and commit, but the old file
with the leading space remains inside .hg since it's already part of the
If you copy the repo root directory (with all its contents) to for
example a USB flash stick using Explorer of Windows Vista or Windows 7,
explorer corrupts the repo by modifying the filenames because explorer
of Vista or Windows 7 strips leading spaces from filenames (explorer of
Windows XP doesn't do that).
If the repository format is Mercurial >= 1.7, no corruption can happen
any more because the leading spaces inside .hg/store are encoded (and
thus protected from silly Vista/Windows 7 Explorer).
Again, upgrading Mercurial / TortoiseHg won't upgrade repository formats
of preexisting repositories (those need to be converted using 'hg clone
--pull' if you need the new repo format -- which is the case here).
> Office computer installed TortoiseHg 1.0 and Mercurial 1.5, which I just
> used to get my current repo by cloning from a remote server, and when I
> tried to verify it today, all goes well. It means that though I have
> used the latest version of TortoiseHg and Mercurial on my home computer,
That's good. So you have a perfectly fine repo in format < 1.7 at your
Sounds like a good moment to make a backup (just don't use Vista or
Windows 7 Explorer to make a backup of a pre-1.7 repo :-).
All that you should do is installing the latest Mercurial or TortoiseHg
version at your office computer and convert the repo on your office
computer to the latest format using
hg clone --pull repo newrepo
> but the repo has been corrupted when copying from office. In other
> words, Win7(32bit version) would not do auto-stripping though filename
> contains leading spaces,
Stupid Explorer of Windows 7 *does* strip leading spaces of filenames.
So it will (or already has) corrupted your home repo.
> but when copying repo to WindowsXP, leading
> spaces will be stripped, thus repo corruption problem occurs.
It doesn't need a Windows XP to have stripped filenames. In fact,
Explorer of Windows XP doesn't strip leading spaces, so it is better
than Explorer of Vista or Windows 7.
> So according to Adrian's important suggestion and my today's finding, I
> think there maybe two solutions for me:
> 1) convert the repo on my home computer with --pull cloning
> But the repo has already been currpted, so I'm not sure the files which
> has been stripped will be recoveried after conversion.
> If it's ok, then good. If not, I think I can hack the fncache file.
Conversion will fail since the repo at your home is already corrupt.
If you try to manually repair the repo: you'd need to rectify the
filename inside .hg/store (which would be a task for an expert, since
you need to understand the filename encoding. I'll refrain from making
detailed suggestions here, as I think that's just too delicate).
I wouldn't try doing that. Start from your office repo again.
> 2) import my changesets to office computer and try to push
> Because repo on office computer is not corrupted, so it's ok to import
> these new changesets, the only troublesome thing is remaking changes and
> recommitting them.
That sounds slightly better.
> That's all I can think and summary; hope it can help someone who have
> the same problem in future.
More information about the Mercurial-devel