Remote Merge

Martin Pool martinpool at gmail.com
Fri Oct 28 02:49:17 BST 2005


On 28/10/05, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> | I think we can reasonably detect whether there are any uncommitted
> | changes in the remote working directory, and if so refuse to push.
>
> Urk.  Really?  Are you thinking about last-modified headers in http, or
> something?  Would modified permissions and symlink targets be detected?

No, I was talking about statting and reading the working files, much
as we do on local working directories.  sftp should let you read
directories, check permissions, and read the targets of symlinks.  (At
least, with a sufficiently good server.)  I wouldn't suggest using any
kind of stat-cache though.

So what we'd have to do is stat every remote file; if any are missing
or have a different size then it's modified.  Otherwise, read back the
contents of all of them.  Maybe this would slow it down too much to be
worthwhile, but it is possible.

Of course you could do this far more efficiently if there was a smart
server there, just by asking it if anything was modified.

--
Martin




More information about the bazaar mailing list