Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
( )
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/bookmarks.py (4 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute |
""" | """ | ||||
def __init__(self, repo): | def __init__(self, repo): | ||||
self._repo = repo | self._repo = repo | ||||
self._refmap = refmap = {} # refspec: node | self._refmap = refmap = {} # refspec: node | ||||
self._nodemap = nodemap = {} # node: sorted([refspec, ...]) | self._nodemap = nodemap = {} # node: sorted([refspec, ...]) | ||||
self._clean = True | self._clean = True | ||||
self._aclean = True | self._aclean = True | ||||
nm = repo.changelog.nodemap | has_node = repo.changelog.index.has_node | ||||
tonode = bin # force local lookup | tonode = bin # force local lookup | ||||
try: | try: | ||||
with _getbkfile(repo) as bkfile: | with _getbkfile(repo) as bkfile: | ||||
for line in bkfile: | for line in bkfile: | ||||
line = line.strip() | line = line.strip() | ||||
if not line: | if not line: | ||||
continue | continue | ||||
try: | try: | ||||
sha, refspec = line.split(b' ', 1) | sha, refspec = line.split(b' ', 1) | ||||
node = tonode(sha) | node = tonode(sha) | ||||
if node in nm: | if has_node(node): | ||||
refspec = encoding.tolocal(refspec) | refspec = encoding.tolocal(refspec) | ||||
refmap[refspec] = node | refmap[refspec] = node | ||||
nrefs = nodemap.get(node) | nrefs = nodemap.get(node) | ||||
if nrefs is None: | if nrefs is None: | ||||
nodemap[node] = [refspec] | nodemap[node] = [refspec] | ||||
else: | else: | ||||
nrefs.append(refspec) | nrefs.append(refspec) | ||||
if nrefs[-2] > refspec: | if nrefs[-2] > refspec: |