##// END OF EJS Templates
workingfilectx: always use the same filelog, even for renames...
workingfilectx: always use the same filelog, even for renames workingfilectx() was using the "src" filelog in case the file was renamed in the working copy. For consistency, stop special-casing it. This allows us to remove some duplication between filectx and workingfilectx.

File last commit:

r8386:4aad9821 default
r8528:4ddffb79 default
Show More
common.py
29 lines | 754 B | text/x-python | PythonLexer
# server.py - inotify common protocol code
#
# Copyright 2006, 2007, 2008 Bryan O'Sullivan <bos@serpentine.com>
# Copyright 2007, 2008 Brendan Cully <brendan@kublai.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2, incorporated herein by reference.
import cStringIO, socket, struct
version = 1
resphdrfmts = {
'STAT': '>llllllll' # status requests
}
resphdrsizes = dict((k, struct.calcsize(v))
for k, v in resphdrfmts.iteritems())
def recvcs(sock):
cs = cStringIO.StringIO()
s = True
try:
while s:
s = sock.recv(65536)
cs.write(s)
finally:
sock.shutdown(socket.SHUT_RD)
cs.seek(0)
return cs