Mercurial > public > mercurial-scm > hg
comparison mercurial/exchange.py @ 23081:e62c330a044f stable
bookmarks: explicitly track identical bookmarks
bookmarks.compare() previously lumped identical bookmarks in the
"invalid" bucket. This patch adds a "same" bucket.
An 8-tuple for holding this state is pretty gnarly. The return value
should probably be converted into a class to increase readability. But
that is beyond the scope of a patch intended to be a late arrival to
stable.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 24 Oct 2014 10:40:37 -0700 |
parents | f10019d2ee0a |
children | 0fc4686de1d7 |
comparison
equal
deleted
inserted
replaced
23080:c586cb50872b | 23081:e62c330a044f |
---|---|
331 remotebookmark = remote.listkeys('bookmarks') | 331 remotebookmark = remote.listkeys('bookmarks') |
332 | 332 |
333 explicit = set(pushop.bookmarks) | 333 explicit = set(pushop.bookmarks) |
334 | 334 |
335 comp = bookmod.compare(repo, repo._bookmarks, remotebookmark, srchex=hex) | 335 comp = bookmod.compare(repo, repo._bookmarks, remotebookmark, srchex=hex) |
336 addsrc, adddst, advsrc, advdst, diverge, differ, invalid = comp | 336 addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = comp |
337 for b, scid, dcid in advsrc: | 337 for b, scid, dcid in advsrc: |
338 if b in explicit: | 338 if b in explicit: |
339 explicit.remove(b) | 339 explicit.remove(b) |
340 if not ancestors or repo[scid].rev() in ancestors: | 340 if not ancestors or repo[scid].rev() in ancestors: |
341 pushop.outbookmarks.append((b, dcid, scid)) | 341 pushop.outbookmarks.append((b, dcid, scid)) |