Bug 4609 - if no changesets are pushed, pending changelog is empty
Summary: if no changesets are pushed, pending changelog is empty
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 3.4-rc
Hardware: PC Linux
: urgent bug
Assignee: Pierre-Yves David
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-04-20 11:05 UTC by Julien Cristau
Modified: 2015-04-21 04:43 UTC (History)
2 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Cristau 2015-04-20 11:05 UTC
when pushing a bookmark change with no new changesets, hooks see an empty repo.
Comment 1 Julien Cristau 2015-04-20 11:07 UTC
if no changesets are pushed, no changelog.a are written.  changelog.readpending sets the changelog as empty instead of being a nop.
Comment 2 HG Bot 2015-04-20 13:15 UTC
Fixed by http://selenic.com/repo/hg/rev/8678b1eafbcf
Pierre-Yves David <pierre-yves.david@fb.com>
changelog: fix readpending if no pending data exist  (issue4609)

Since transaction are used for more than just changesets, it is possible
to have a transaction without new changesets at all. In this case no
''00changelog.i.a' are written. In all cases the 'changelog.readpending'
method is called if the repository has any pending data. The 'revlog' logic
provides empty content if the file is missing, so the whole operation
resulted in an empty changelog.

We now skip reading the pending file if it is missing.

(please test the fix)