# HG changeset patch # User Boris Feld <boris.f...@octobus.net> # Date 1538058910 -7200 # Thu Sep 27 16:35:10 2018 +0200 # Node ID 4bd42e72e7ba8c0ee9dc4e153127882e6961602a # Parent b36914d9928effac212d851c9617de93d6260746 # EXP-Topic obsolete-duplicates # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 4bd42e72e7ba pullreport: skip filtered revs instead of obsolete ones
Obsolescence is closely related to visibility but still a distinct concept. We can receive changesets that are obsolete but visible (eg: when pulling orphans). Such changeset should be reported too. In addition, the filtering level can be anything, we should respect it. diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -1603,13 +1603,11 @@ def registersummarycallback(repo, otr, t if origrepolen >= len(repo): return - # Compute the bounds of new revisions' range, excluding obsoletes. - unfi = repo.unfiltered() - revs = unfi.revs('%d: and not obsolete()', origrepolen) + # Compute the bounds of new visible revisions' range. + revs = list(repo.changelog.revs(start=origrepolen)) if not revs: - # Got only obsoletes. return - minrev, maxrev = repo[revs.min()], repo[revs.max()] + minrev, maxrev = repo[revs[0]], repo[revs[-1]] if minrev == maxrev: revrange = minrev diff --git a/tests/test-obsolete-distributed.t b/tests/test-obsolete-distributed.t --- a/tests/test-obsolete-distributed.t +++ b/tests/test-obsolete-distributed.t @@ -537,5 +537,5 @@ Actual test added 2 changesets with 0 changes to 0 files 1 new obsolescence markers 1 new orphan changesets - new changesets 95d586532b49 (1 drafts) + new changesets 66f7d451a68b:95d586532b49 (2 drafts) (run 'hg update' to get a working copy) _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel