Re: nvm.alt_tmpdir

Stephen Leake <[email protected]>
Newsgroups gmane.comp.version-control.monotone.devel
Message-ID <[email protected]>
Richard Levitte <[email protected]> writes:

> So, am I getting this right, the issue is actually to move a file from
> one device to another?  

Yes.

> It seems a bit overcomplicated to have a tmpdir option when we could
> simply detect if source and destination are on the same device (the
> structure returned by stat() has the fields st_dev which is to be used
> for this), and select to do something corresponding to 'mv' if it's
> the same, or 'cp' followed by 'rm' if not.

Nathaniel made the same comment.

I also considered just doing copy/remove instead of rename back when I first
proposed this
(http://lists.nongnu.org/archive/html/monotone-devel/2010-12/msg00044.html),
but rejected it as not being in the spirit of monotone.

Now that I see how messy the tmpdir solution actually is, and that the
Win32 code actually does copy/remove on older Win32 versions, I'm happy
to give up on tmpdir and implement copy/remove if fstat shows it's
needed.

So I'll implement that on a new branch.

-- 
-- Stephe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.