Details
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG417a1691a273: convert: remove pycompat.iteritems()
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
Alphare |
hg-reviewers |
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | hgext/convert/cvs.py (3 lines) | |||
M | hgext/convert/hg.py (3 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
42706a6b0c5e | f1e46ca72c16 | Gregory Szorc | Mar 1 2022, 11:44 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | D12339 ui: use input() directly | |
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg |
from mercurial.i18n import _ | from mercurial.i18n import _ | ||||
from mercurial.pycompat import ( | from mercurial.pycompat import ( | ||||
getattr, | getattr, | ||||
open, | open, | ||||
) | ) | ||||
from mercurial import ( | from mercurial import ( | ||||
encoding, | encoding, | ||||
error, | error, | ||||
pycompat, | |||||
util, | util, | ||||
) | ) | ||||
from mercurial.utils import ( | from mercurial.utils import ( | ||||
dateutil, | dateutil, | ||||
procutil, | procutil, | ||||
) | ) | ||||
from . import ( | from . import ( | ||||
self.readp.readline() | self.readp.readline() | ||||
else: | else: | ||||
raise error.Abort(_(b"unknown CVS response: %s") % line) | raise error.Abort(_(b"unknown CVS response: %s") % line) | ||||
def getchanges(self, rev, full): | def getchanges(self, rev, full): | ||||
if full: | if full: | ||||
raise error.Abort(_(b"convert from cvs does not support --full")) | raise error.Abort(_(b"convert from cvs does not support --full")) | ||||
self._parse() | self._parse() | ||||
return sorted(pycompat.iteritems(self.files[rev])), {}, set() | return sorted(self.files[rev].items()), {}, set() | ||||
def getcommit(self, rev): | def getcommit(self, rev): | ||||
self._parse() | self._parse() | ||||
return self.changeset[rev] | return self.changeset[rev] | ||||
def gettags(self): | def gettags(self): | ||||
self._parse() | self._parse() | ||||
return self.tags | return self.tags | ||||
def getchangedfiles(self, rev, i): | def getchangedfiles(self, rev, i): | ||||
self._parse() | self._parse() | ||||
return sorted(self.files[rev]) | return sorted(self.files[rev]) |
error, | error, | ||||
exchange, | exchange, | ||||
hg, | hg, | ||||
lock as lockmod, | lock as lockmod, | ||||
logcmdutil, | logcmdutil, | ||||
merge as mergemod, | merge as mergemod, | ||||
mergestate, | mergestate, | ||||
phases, | phases, | ||||
pycompat, | |||||
util, | util, | ||||
) | ) | ||||
from mercurial.utils import dateutil | from mercurial.utils import dateutil | ||||
stringio = util.stringio | stringio = util.stringio | ||||
from . import common | from . import common | ||||
return parent | return parent | ||||
return p2 | return p2 | ||||
def puttags(self, tags): | def puttags(self, tags): | ||||
tagparent = self.repo.branchtip(self.tagsbranch, ignoremissing=True) | tagparent = self.repo.branchtip(self.tagsbranch, ignoremissing=True) | ||||
tagparent = tagparent or self.repo.nullid | tagparent = tagparent or self.repo.nullid | ||||
oldlines = set() | oldlines = set() | ||||
for branch, heads in pycompat.iteritems(self.repo.branchmap()): | for branch, heads in self.repo.branchmap().items(): | ||||
for h in heads: | for h in heads: | ||||
if b'.hgtags' in self.repo[h]: | if b'.hgtags' in self.repo[h]: | ||||
oldlines.update( | oldlines.update( | ||||
set(self.repo[h][b'.hgtags'].data().splitlines(True)) | set(self.repo[h][b'.hgtags'].data().splitlines(True)) | ||||
) | ) | ||||
oldlines = sorted(list(oldlines)) | oldlines = sorted(list(oldlines)) | ||||
newlines = sorted([(b"%s %s\n" % (tags[tag], tag)) for tag in tags]) | newlines = sorted([(b"%s %s\n" % (tags[tag], tag)) for tag in tags]) |