Add a scheme for handling remote locking
This adds an object that remembers to unlock the remote repo on
destruction and lock/unlock functions for the ssh protocol. The remote
repository should also unlock itself when the connection goes down.
Move the empty changeset detection out of findincoming to pull
This lets us reuse findincoming for findoutgoing
Protocol switch from using generators to stream-like objects.
This allows the the pull side to precisely control how much data is
read so that another encapsulation layer is not needed.
An http client gets a response with a finite size. Because ssh clients
need to keep the stream open, we must not read more data than is sent
in a response. But due to the streaming nature of the changegroup
scheme, only the piece that's parsing the data knows how far it's
allowed to read.
This means the generator scheme isn't fine-grained enough. Instead we
need file-like objects with a read(x) method. This switches everything
for push/pull over to using file-like objects rather than generators.
Add a repo method to report repo device
This is used to establish whether repos are on the same device for
hard linking. Remote repos all return -1.
Provides output option to cat command
# HG changeset patch
# User thananck@yahoo.com
# Node ID
c838b9c2c71b1d64b8bde786f6470b30f23962de
# Parent
7369ec5d93f2ffd490a43970edd9adf8d2bbe269
Provides output option to cat command
expand function in commands.doexport is moved to toplevel and renamed
to make_filename. The 'cat' command now accecpts --output <pattern>
switch to specify the destination file.
Index: hg/mercurial/commands.py
===================================================================