D3715: namespaces: allow namespaces whose symbols resolve to many nodes (API)

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Tue Jun 26 08:28:21 EDT 2018


yuja added a comment.


  >   I was also thinking we could do that, but it feels like a workaround to me. I think of bookmarks and tags as pointing to specific commits. I think of branches as being many commits. `hg help revisions` says this:
  >   
  >     Any other string is treated as a bookmark, tag, or branch name. A bookmark
  >     is a movable pointer to a revision. A tag is a permanent name associated
  >     with a revision. A branch name denotes the tipmost open branch head of
  >     that branch - or if they are all closed, the tipmost closed head of the
  >     branch. Bookmark, tag, and branch names must not contain the ":"
  >     character.
  >   
  >   It specifically mentions bookmarks, tags, and branches, and it describes how each name resolves to a commit. To me, that makes it sound like some symbols can resolve to multiple commits. And indeed, revset aliases can already resolve to multiple commits.
  
  I read it implying that any sort of symbol resolves to a single revision since
  all three core "names" work in such way. I'm not against adding multi-node
  symbol resolution because it seems useful, but I agree with Sean that it would
  introduce inconsistency.
  
  I have no idea about the `namemap()` API.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3715

To: martinvonz, #hg-reviewers, durin42
Cc: yuja, durin42, smf, lothiraldan, mercurial-devel


More information about the Mercurial-devel mailing list