equal
deleted
inserted
replaced
3863 return fn |
3863 return fn |
3864 for n in itertools.count(1): |
3864 for n in itertools.count(1): |
3865 fn = '%s~%s~%s' % (f, tag, n) |
3865 fn = '%s~%s~%s' % (f, tag, n) |
3866 if fn not in ctx and fn not in others: |
3866 if fn not in ctx and fn not in others: |
3867 return fn |
3867 return fn |
|
3868 |
|
3869 def readexactly(stream, n): |
|
3870 '''read n bytes from stream.read and abort if less was available''' |
|
3871 s = stream.read(n) |
|
3872 if len(s) < n: |
|
3873 raise error.Abort(_("stream ended unexpectedly" |
|
3874 " (got %d bytes, expected %d)") |
|
3875 % (len(s), n)) |
|
3876 return s |