[hg-import bug] operation not supported over http

Aaron Bentley aaron.bentley at utoronto.ca
Sun Jun 18 04:27:18 BST 2006

Hash: SHA1

John Arbash Meinel wrote:
> This is risky code. Transports aren't guaranteed to work perfectly with
> directories instead of files. I would be much happier if we looked for
> something like '.hg/dirstate'. Though I don't know hg's rules on what
> makes an hg directory. (It very easily could be the presence of a
> directory). 

AFAICT, .hg and .hg/data (also a directory) are all that's required to
be an Hg versioned directory.  That's all you get from hg init.

I'd be willing to require that the repo have one commit, which lets you
look for 00manifest.i or dirstate or something.

> They don't seem to have much of a way to indicate the
> version for the directory. Other than maybe reading something like
> dirstate and seeing the format header.

I don't think they believe in format headers.  Least, I can't see any.

> The reason being if the file exists, we now have a copy of it, and don't
> need another round trip.

Right. That's my usual routine.

> If we are using 'transport.has()', though, I prefer your code which
> raises 'NotBranchError' when it cannot bind to the branch at that location.

Much better than binding when there's no .hg, I agree.

Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the bazaar mailing list