Commit 67a61388 authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

merge with stable

Pipeline #22651 failed with stage
in 25 minutes and 31 seconds
......@@ -121,7 +121,7 @@ class CompressDialog(QDialog):
def commit(self):
tip, base = self.revs
revs = [c for c in self.repo.revs(b'%s::%s' % (base, tip)) if c != base]
revs = [c for c in self.repo.revs(b'%d::%d' % (base, tip)) if c != base]
descs = [self.repo[c].description() for c in revs]
self.repo.vfs(b'cur-message.txt', b'w').write(b'\n* * *\n'.join(descs))
......
......@@ -936,13 +936,20 @@ def user(ctx):
def getestimatedsize(fctx):
# type: (...) -> int
"""Return the size of the given fctx without loading the revision text"""
FILE_SIZE_UNKNOWN = 2147483647
if fctx.rev() is None:
return fctx.size()
else:
# fctx.size() can read all data into memory in rename cases so
# we read the size directly from the filelog, this is deeper
# under the API than I prefer to go, but seems necessary
return fctx._filelog._revlog.rawsize(fctx.filerev())
try:
return fctx._filelog._revlog.rawsize(fctx.filerev())
except AttributeError:
# _filelog is not available when using the remotefilelog extension
# on a shallow repo
return FILE_SIZE_UNKNOWN
def get_revision_desc(fctx, curpath=None):
# type: (Any, Optional[bytes]) -> pycompat.unicode
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment