problem cloning large file (32MB) on Windows/Network Shares
rollin
rollinforall at gmail.com
Thu Jan 13 19:59:41 CST 2011
Well, I currently only have a binary distribution; and building 3rd party
apps on windows is a pain most of the time. is it possible for you to
supply me with the hg.exe (and/or whatever dll's) that I can just try out?
if not, I guess I could download the source; read up on building in windows
(and hopefully not requiring cygwin); build it; learn about applying a
patch; and, finally, testing it. This will take me some time.
Sounds like we'll eventually get a fix. tx for your help.
cheers, roy
On Thu, Jan 13, 2011 at 8:40 PM, Adrian Buehlmann <adrian at cadifra.com>wrote:
> On 2011-01-14 02:27, rollin wrote:
> > When I modified my test program to use GENERIC_READ | GENERIC_WRITE, it
> > worked on both the local drive and the shared drive.
>
> If you manage to build mercurial, try this experimental patch:
>
> diff --git a/mercurial/osutil.c b/mercurial/osutil.c
> --- a/mercurial/osutil.c
> +++ b/mercurial/osutil.c
> @@ -436,7 +436,7 @@ static PyObject *posixfile(PyObject *sel
> }
> else
> flags = _O_TEXT;
> - if (plus) {
> + if (plus || m0 != 'r') {
> flags |= _O_RDWR;
> access = GENERIC_READ | GENERIC_WRITE;
> fpmode[fppos++] = '+';
> @@ -453,18 +453,10 @@ static PyObject *posixfile(PyObject *sel
> break;
> case 'w':
> creation = CREATE_ALWAYS;
> - if (!plus) {
> - access = GENERIC_WRITE;
> - flags |= _O_WRONLY;
> - }
> break;
> case 'a':
> creation = OPEN_ALWAYS;
> flags |= _O_APPEND;
> - if (!plus) {
> - flags |= _O_WRONLY;
> - access = GENERIC_WRITE;
> - }
> break;
> default:
> PyErr_Format(PyExc_ValueError,
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20110113/d2196c8f/attachment.htm>
More information about the Mercurial
mailing list