Mercurial > hg
diff mercurial/pathutil.py @ 29371:1b699c7eb2b7
changegroup: don't send empty subdirectory manifest groups
When grafting/rebasing, it is common for multiple changesets to make
the same change to a subdirectory. When writing the revlog for the
directory, the revlog code already takes care of not writing the entry
again. In 0c2a088ffcc5 (changegroup: prune subdirectory dirlogs too,
2016-02-12), I added the corresponding code in changegroup (not
sending entries the client already has), but I forgot to avoid sending
the entire changegroup if no nodes remained in the pruned
set. Although that's harmless besides the wasted network traffic, the
receiving side was checking for it (copied from the changegroup code
for handling files). This resulted in the client crashing with:
abort: received dir revlog group is empty
Fix by simply not emitting a changegroup for the directory if there
were no changes is it. This matches how files are handled.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 16 Jun 2016 15:15:33 -0700 |
parents | 0b7ce0b16d8a |
children | 6f447b9ec263 |