# HG changeset patch # User jcoomes # Date 1410016599 25200 # Node ID 3c2eaa8d1d221ab49b92aa405b64758102ad2752 # Parent 1c8acfd41d54c1fe3db1a1047b48ee041fe42693 commit: some merges are not committed Merges without modified/added/removed files were skipped by condcommit(). diff -r 1c8acfd41d54 -r 3c2eaa8d1d22 trees.py --- a/trees.py Wed Jun 11 17:20:53 2014 -0700 +++ b/trees.py Sat Sep 06 08:16:39 2014 -0700 @@ -452,9 +452,12 @@ hgcommit = _origcmd('commit') def condcommit(ui, repo, *pats, **opts): '''commit conditionally - only if there is something to commit''' - for l in repo.status()[:3]: # modified, added, removed - if l: - return hgcommit(ui, repo, *pats, **opts) + needcommit = len(repo[None].parents()) > 1 # merge + if not needcommit: + mar = repo.status()[:3] # modified, added, removed + needcommit = bool(mar[0] or mar[1] or mar[2]) + if needcommit: + return hgcommit(ui, repo, *pats, **opts) ui.status('nothing to commit\n') return 0