comparison of bookmarks at incoming/outgoing

Kevin Bullock kbullock+mercurial at ringworld.org
Mon Aug 20 11:49:46 CDT 2012


On Aug 20, 2012, at 5:21 AM, FUJIWARA Katsunori wrote:

> So, what about adding HINT information like below ?
> 
>  - it is assumed that bookmarks points:
>    - REV-L on local side
>    - REV-R on remote side
> 
>  - if local repo has REV-R:
> 
>    - if common ancestor of REV-L and REV-R is none of each:
>      show "divergent" as hint
> 
>    - otherwise:
>      - if common ancestor of them is REV-L:
>        show "advanced remotely" as hint
> 
>      - otherwise:
>        show "advanced locally" as hint

…which, to summarize, is the case where we *can* tell reliably whether the remote bookmark is advanced remotely, advanced locally, or divergent. So far so good. I gather that the common ancestor calculation is O(n), where n <= count(ANC::REV1) + count(ANC::REV2). Someone with more than passing knowledge of the algorithm can correct me. In any case, I'm not sure it would make a huge difference relative to the network communications time.

*waits for Bryan to jump in*

>  - otherwise:
> 
>    REV-R should be the revision newly added on remote, so "advanced
>    locally" can be ignored in this case.
> 
>    but there is no other information (in reasonable costs) to
>    determine relation between REV-L and REV-R, so show "advanced
>    remotely or divergent" as hint

This also looks good to me, although I think we can probably come up with a better way to word it. Maybe something as simple as 'bookmark MARK changed on remote'

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120820/7bf45ce5/attachment.html>


More information about the Mercurial-devel mailing list