Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | contrib/python3-whitelist (1 line) | |||
| M | hgext/convert/git.py (6 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| Augie Fackler | Jan 30 2019, 6:32 PM |
| test-convert-clonebranches.t | test-convert-clonebranches.t | ||||
| test-convert-cvs-branch.t | test-convert-cvs-branch.t | ||||
| test-convert-cvs-detectmerge.t | test-convert-cvs-detectmerge.t | ||||
| test-convert-cvs-synthetic.t | test-convert-cvs-synthetic.t | ||||
| test-convert-cvs.t | test-convert-cvs.t | ||||
| test-convert-cvsnt-mergepoints.t | test-convert-cvsnt-mergepoints.t | ||||
| test-convert-datesort.t | test-convert-datesort.t | ||||
| test-convert-filemap.t | test-convert-filemap.t | ||||
| test-convert-git.t | |||||
| test-convert-hg-sink.t | test-convert-hg-sink.t | ||||
| test-convert-hg-source.t | test-convert-hg-source.t | ||||
| test-convert-hg-startrev.t | test-convert-hg-startrev.t | ||||
| test-convert-splicemap.t | test-convert-splicemap.t | ||||
| test-convert-svn-sink.t | test-convert-svn-sink.t | ||||
| test-convert-tagsbranch-topology.t | test-convert-tagsbranch-topology.t | ||||
| test-convert.t | test-convert.t | ||||
| test-copy-move-merge.t | test-copy-move-merge.t | ||||
| # git.py - git support for the convert extension | # git.py - git support for the convert extension | ||||
| # | # | ||||
| # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> and others | # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> and others | ||||
| # | # | ||||
| # This software may be used and distributed according to the terms of the | # This software may be used and distributed according to the terms of the | ||||
| # GNU General Public License version 2 or any later version. | # GNU General Public License version 2 or any later version. | ||||
| from __future__ import absolute_import | from __future__ import absolute_import | ||||
| import os | import os | ||||
| from mercurial.i18n import _ | from mercurial.i18n import _ | ||||
| from mercurial import ( | from mercurial import ( | ||||
| config, | config, | ||||
| error, | error, | ||||
| node as nodemod, | node as nodemod, | ||||
| pycompat, | |||||
| ) | ) | ||||
| from . import ( | from . import ( | ||||
| common, | common, | ||||
| ) | ) | ||||
| class submodule(object): | class submodule(object): | ||||
| def __init__(self, path, node, url): | def __init__(self, path, node, url): | ||||
| def catfile(self, rev, ftype): | def catfile(self, rev, ftype): | ||||
| if rev == nodemod.nullhex: | if rev == nodemod.nullhex: | ||||
| raise IOError | raise IOError | ||||
| self.catfilepipe[0].write(rev+'\n') | self.catfilepipe[0].write(rev+'\n') | ||||
| self.catfilepipe[0].flush() | self.catfilepipe[0].flush() | ||||
| info = self.catfilepipe[1].readline().split() | info = self.catfilepipe[1].readline().split() | ||||
| if info[1] != ftype: | if info[1] != ftype: | ||||
| raise error.Abort(_('cannot read %r object at %s') % (ftype, rev)) | raise error.Abort(_('cannot read %r object at %s') % ( | ||||
| pycompat.bytestr(ftype), rev)) | |||||
| size = int(info[2]) | size = int(info[2]) | ||||
| data = self.catfilepipe[1].read(size) | data = self.catfilepipe[1].read(size) | ||||
| if len(data) < size: | if len(data) < size: | ||||
| raise error.Abort(_('cannot read %r object at %s: unexpected size') | raise error.Abort(_('cannot read %r object at %s: unexpected size') | ||||
| % (ftype, rev)) | % (ftype, rev)) | ||||
| # read the trailing newline | # read the trailing newline | ||||
| self.catfilepipe[1].read(1) | self.catfilepipe[1].read(1) | ||||
| return data | return data | ||||
| changes.append((f, h)) | changes.append((f, h)) | ||||
| while i < lcount: | while i < lcount: | ||||
| l = difftree[i] | l = difftree[i] | ||||
| i += 1 | i += 1 | ||||
| if not entry: | if not entry: | ||||
| if not l.startswith(':'): | if not l.startswith(':'): | ||||
| continue | continue | ||||
| entry = l.split() | entry = tuple(pycompat.bytestr(p) for p in l.split()) | ||||
| continue | continue | ||||
| f = l | f = l | ||||
| if entry[4][0] == 'C': | if entry[4][0] == 'C': | ||||
| copysrc = f | copysrc = f | ||||
| copydest = difftree[i] | copydest = difftree[i] | ||||
| i += 1 | i += 1 | ||||
| f = copydest | f = copydest | ||||
| copies[copydest] = copysrc | copies[copydest] = copysrc | ||||