Mercurial > hg
comparison mercurial/scmutil.py @ 38575:152f4822d210
pycompat: move rapply() from util
I want to use rapply() in utils.* modules, but that would introduce a
reference cycle util -> utils.* -> util. Moving rapply() to pycompat
should be okay since it mostly serves as a compatibility helper.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 10 Jun 2018 17:07:29 +0900 |
parents | 077301ac69dc |
children | 85c74c5a1590 |
comparison
equal
deleted
inserted
replaced
38574:f442c9494ec7 | 38575:152f4822d210 |
---|---|
863 oldbmarks = repo.nodebookmarks(oldnode) | 863 oldbmarks = repo.nodebookmarks(oldnode) |
864 if not oldbmarks: | 864 if not oldbmarks: |
865 continue | 865 continue |
866 from . import bookmarks # avoid import cycle | 866 from . import bookmarks # avoid import cycle |
867 repo.ui.debug('moving bookmarks %r from %s to %s\n' % | 867 repo.ui.debug('moving bookmarks %r from %s to %s\n' % |
868 (util.rapply(pycompat.maybebytestr, oldbmarks), | 868 (pycompat.rapply(pycompat.maybebytestr, oldbmarks), |
869 hex(oldnode), hex(newnode))) | 869 hex(oldnode), hex(newnode))) |
870 # Delete divergent bookmarks being parents of related newnodes | 870 # Delete divergent bookmarks being parents of related newnodes |
871 deleterevs = repo.revs('parents(roots(%ln & (::%n))) - parents(%n)', | 871 deleterevs = repo.revs('parents(roots(%ln & (::%n))) - parents(%n)', |
872 allnewnodes, newnode, oldnode) | 872 allnewnodes, newnode, oldnode) |
873 deletenodes = _containsnode(repo, deleterevs) | 873 deletenodes = _containsnode(repo, deleterevs) |