p4fastimport: support client view

Summary:
Perforce client support a view. A view maps a server side path to a client side
path, e.g.: the view '//depot/A/B/... //myclient/foo/...' maps every file in
//depot/A/B/ on the server side to a local checkout foo/ inside the root for
checkouts defined for the client 'myclient'.
We are using §p4 where§ to support these mappings. We do the mapping inside the
FileImporter at the moment as this runs nicely in parallel. It's a bit hacky
but get's the job done. We use this mostly to ommit the common prefix
//depot/... and remove branch indicators such as Main.

So in our case a view looks like

  //depot/Software/OculusSDK/PC/Main... //client/Software/OculusSDK/PC/...

resulting in a file

  //depot/Software/OculusSDK/PC/Main/test.txt

being imported as

  Software/OculusSDK/PC/test.xt

Test Plan: rt test-p4*

Reviewers: #sourcecontrol, #idi, ikostia

Reviewed By: ikostia

Subscribers: ikostia, durham, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4913483

Signature: t1:4913483:1492702356:b97b691343b8a1d52940445934730b31d411db4c
This commit is contained in:
David Soria Parra 2017-04-25 15:29:39 +01:00
parent 3799abce68
commit 78dcff9f00
15 changed files with 262 additions and 130 deletions

View File

@ -121,6 +121,22 @@ def create(tr, ui, repo, importset, filelogs):
cmdtable = {}
command = cmdutil.command(cmdtable)
def runworker(ui, fn, wargs, items):
# 0.4 is the cost per argument. So if we have at least 100 files
# on a 4 core machine than our linear cost outweights the
# drawback of spwaning. We are overwritign this if we force a
# worker to run with a ridiculous high number.
weight = 0.0 # disable worker
if ui.config('p4fastimport', 'useworker', None) == 'force':
weight = 100000.0 # force worker
elif ui.configbool('p4fastimport', 'useworker', False):
weight = 0.04 # normal weight
# Fix duplicated messages before
# https://www.mercurial-scm.org/repo/hg-committed/rev/9d3d56aa1a9f
ui.flush()
return worker.worker(ui, weight, fn, wargs, items)
@command(
'p4fastimport',
[('P', 'path', '.', _('path to the local depot store'), _('PATH'))],
@ -163,7 +179,8 @@ def p4fastimport(ui, repo, client, **opts):
fileinfo['depotFile']))
ui.note(_('%d files to import.\n') % len(filelist))
importset = importer.ImportSet(repo, changelists, filelist, basepath)
importset = importer.ImportSet(repo, client, changelists,
filelist, basepath)
p4filelogs = []
for i, f in enumerate(importset.filelogs()):
ui.progress(_('loading filelog'), i, item=f, unit="filelog",
@ -194,34 +211,21 @@ def p4fastimport(ui, repo, client, **opts):
# 3. Import files.
count = 0
fileflags = {}
fileinfo = {}
largefiles = []
baserevs = collections.defaultdict(lambda: 0)
for filelogs in map(sorted, runlist.values()):
wargs = (tr, ui, repo, importset)
# 0.4 is the cost per argument. So if we have at least 100 files
# on a 4 core machine than our linear cost outweights the
# drawback of spwaning. We are overwritign this if we force a
# worker to run with a ridiculous high number.
weight = 0.0 # disable worker
if ui.config('p4fastimport', 'useworker', None) == 'force':
weight = 100000.0 # force worker
elif ui.configbool('p4fastimport', 'useworker', False):
weight = 0.04 # normal weight
# Fix duplicated messages before
# https://www.mercurial-scm.org/repo/hg-committed/rev/9d3d56aa1a9f
ui.flush()
prog = worker.worker(ui, weight, create, wargs, filelogs)
for i, serialized in prog:
for i, serialized in runworker(ui, create, wargs, filelogs):
data = json.loads(serialized)
ui.progress(_('importing'), count, item=data['depotname'],
unit='file', total=len(p4filelogs))
# Json converts to UTF8 and int keys to strings, so we have to
# convert back. TODO: Find a better way to handle this.
baserevs[data['localname']] = data['oldtiprev']
fileflags.update(util.decodefileflags(data['fileflags']))
fileinfo[data['depotname']] = {
'localname': data['localname'].encode('utf-8'),
'flags': util.decodefileflags(data['fileflags']),
'baserev': data['oldtiprev'],
}
largefiles.extend(data['largefiles'])
count += i
ui.progress(_('importing'), None)
@ -233,7 +237,7 @@ def p4fastimport(ui, repo, client, **opts):
revisions.append((cl, hex(hgnode)))
revisions = []
for cl, hgnode in clog.creategen(tr, fileflags, baserevs):
for cl, hgnode in clog.creategen(tr, fileinfo):
revisions.append((cl, hex(hgnode)))
if ui.config('p4fastimport', 'lfsmetadata', None) is not None:

View File

@ -15,11 +15,12 @@ from mercurial import (
)
from . import p4
from .util import localpath, caseconflict
from .util import caseconflict, localpath
class ImportSet(object):
def __init__(self, repo, changelists, filelist, storagepath):
def __init__(self, repo, client, changelists, filelist, storagepath):
self.repo = repo
self.client = client
self.changelists = sorted(changelists)
self.filelist = filelist
self.storagepath = storagepath
@ -55,7 +56,7 @@ class ChangeManifestImporter(object):
def create(self, *args, **kwargs):
return list(self.creategen(*args, **kwargs))
def creategen(self, tr, fileflags, baserevs):
def creategen(self, tr, fileinfo):
mrevlog = self._repo.manifestlog._revlog
clog = self._repo.changelog
cp1 = self._repo['tip'].node()
@ -70,27 +71,32 @@ class ChangeManifestImporter(object):
added, modified, removed = change.files
# generate manifest mappings of filenames to filenodes
rmod = filter(lambda f: f in self._importset.filelist, removed)
rf = map(localpath, rmod)
for path in rf:
if path in mf:
del mf[path]
changed = set()
addmod = filter(lambda f: f in self._importset.filelist,
added + modified)
amf = map(localpath, addmod)
for path in amf:
hgfilelog = self._repo.file(path)
# generate manifest mappings of filenames to filenodes
for depotname in removed:
if depotname not in self._importset.filelist:
continue
localname = fileinfo[depotname]['localname']
if localname in mf:
changed.add(localname)
del mf[localname]
for depotname in added + modified:
if depotname not in self._importset.filelist:
continue
info = fileinfo[depotname]
localname, baserev = info['localname'], info['baserev']
hgfilelog = self._repo.file(localname)
try:
fnode = hgfilelog.node(baserevs[path])
mf[localname] = hgfilelog.node(baserev)
except (error.LookupError, IndexError):
raise error.Abort("can't find rev %d for %s cl %d" %
(baserevs[path], path, change.cl))
baserevs[path] += 1
mf[path] = fnode
if path in fileflags and change.cl in fileflags[path]:
mf.setflag(path, fileflags[path][change.cl])
raise error.Abort("can't find rev %d for %s cl %d" % (
baserev, localname, change.cl))
changed.add(localname)
if change.cl in info['flags']:
mf.setflag(localname, info['flags'][change.cl])
fileinfo[depotname]['baserev'] += 1
linkrev = self._importset.linkrev(change.cl)
mp1 = mrevlog.addrevision(mf.text(mrevlog._usemanifestv2), tr,
@ -113,7 +119,7 @@ class ChangeManifestImporter(object):
change.cl, shortdesc))
cp1 = clog.add(
mp1,
amf + rf,
changed,
desc,
tr,
cp1,
@ -250,8 +256,9 @@ class FileImporter(object):
@property
def relpath(self):
# XXX: Do the correct mapping to the clientspec
return localpath(self.depotfile)
client = self._importset.client
where = p4.parse_where(client, self.depotfile)
return where['clientFile'].replace('//%s/' % client, '')
@property
def depotfile(self):
@ -259,7 +266,8 @@ class FileImporter(object):
@util.propertycache
def storepath(self):
path = os.path.join(self._importset.storagepath, self.relpath)
path = os.path.join(self._importset.storagepath,
localpath(self.depotfile))
if p4.config('caseHandling') == 'insensitive':
return path.lower()
return path
@ -319,9 +327,9 @@ class FileImporter(object):
meta = {}
if self._p4filelog.isexec(c.cl):
fileflags[self.relpath][c.cl] = 'x'
fileflags[c.cl] = 'x'
if self._p4filelog.issymlink(c.cl):
fileflags[self.relpath][c.cl] = 'l'
fileflags[c.cl] = 'l'
if self._p4filelog.iskeyworded(c.cl):
# Replace keyword expansion
pass

View File

@ -73,6 +73,18 @@ def parse_filelist(client, startcl=None, endcl=None):
if c:
yield d
def parse_where(client, depotname):
# TODO: investigate if we replace this with exactly one call to
# where //clientame/...
cmd = 'p4 --client %s -G where %s' % (
util.shellquote(client),
util.shellquote(depotname))
stdout = util.popen(cmd, mode='rb')
try:
return marshal.load(stdout)
except Exception:
raise P4Exception(stdout)
def get_file(path, rev=None, clnum=None):
"""Returns a file from Perforce"""
r = '#head'

View File

@ -26,9 +26,8 @@ def caseconflict(filelist):
def decodefileflags(json):
r = collections.defaultdict(dict)
for k, d in json.items():
for n, v in d.items():
r[k][int(n)] = v.encode('ascii')
for changelist, flag in json.items():
r[int(changelist)] = flag.encode('ascii')
return r
def lastcl(node):

View File

@ -17,7 +17,7 @@ New errors are not allowed. Warnings are strongly discouraged.
> hg files --cwd $RUNTESTDIR/.. "set:(**.py or **.txt) - tests/**" | sed "s#^#${RUNTESTDIR}/../#"
> ) | sed 's|\\|/|g' |
> $PYTHON $RUNTESTDIR/../contrib/check-config.py
elif ui.configbool('p4fastimport', 'useworker', False):
elif ui.configbool('p4fastimport', 'useworker', False):
conflict on p4fastimport.useworker: ('bool', '') != ('str', '')
repo.ui.config("paths", "default")))

View File

@ -80,14 +80,14 @@ import
3 files to import.
importing repository.
case conflict: //depot/Main/A and //depot/Main/a
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 2, 2 bytes, src: *, path: depot/Main/A (glob)
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/a (glob)
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 1, 2 bytes, src: *, path: depot/Main/b (glob)
changelist 1: writing manifest. node: 77111a2fe360 p1: 000000000000 p2: 000000000000 linkrev: 0
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 2, 2 bytes, src: *, path: Main/A (glob)
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/a (glob)
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 1, 2 bytes, src: *, path: Main/b (glob)
changelist 1: writing manifest. node: f495e209f723 p1: 000000000000 p2: 000000000000 linkrev: 0
changelist 1: writing changelog: initial
changelist 2: writing manifest. node: 8c09450f9f5d p1: 77111a2fe360 p2: 000000000000 linkrev: 1
changelist 2: writing manifest. node: 510da33a44e3 p1: f495e209f723 p2: 000000000000 linkrev: 1
changelist 2: writing changelog: moveway
changelist 3: writing manifest. node: fc1826355267 p1: 8c09450f9f5d p2: 000000000000 linkrev: 2
changelist 3: writing manifest. node: 6541d210de72 p1: 510da33a44e3 p2: 000000000000 linkrev: 2
changelist 3: writing changelog: moveback
3 revision(s), 3 file(s) imported.
@ -103,21 +103,21 @@ Verify
Update
$ hg manifest -r 0
depot/Main/a
Main/a
$ hg manifest -r 1
depot/Main/b
Main/b
$ hg manifest -r 2
depot/Main/A
Main/A
$ hg update -r 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cat depot/Main/a
$ cat Main/a
a
$ hg update -r 1
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ cat depot/Main/b
$ cat Main/b
a
$ hg update -r 2
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ cat depot/Main/A
$ cat Main/A
a
stopping the p4 server

View File

@ -75,13 +75,13 @@ import
2 files to import.
importing repository.
case conflict: //depot/Main/A and //depot/Main/a
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 2, 2 bytes, src: *, path: depot/Main/A (glob)
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/a (glob)
changelist 1: writing manifest. node: 77111a2fe360 p1: 000000000000 p2: 000000000000 linkrev: 0
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 2, 2 bytes, src: *, path: Main/A (glob)
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/a (glob)
changelist 1: writing manifest. node: f495e209f723 p1: 000000000000 p2: 000000000000 linkrev: 0
changelist 1: writing changelog: initial
changelist 2: writing manifest. node: ba644731a088 p1: 77111a2fe360 p2: 000000000000 linkrev: 1
changelist 2: writing manifest. node: af76bc402ee6 p1: f495e209f723 p2: 000000000000 linkrev: 1
changelist 2: writing changelog: delete
changelist 3: writing manifest. node: a7bdbbc64a41 p1: ba644731a088 p2: 000000000000 linkrev: 2
changelist 3: writing manifest. node: c1187994dfbb p1: af76bc402ee6 p2: 000000000000 linkrev: 2
changelist 3: writing changelog: add with case-inensitivity match
3 revision(s), 2 file(s) imported.
@ -98,12 +98,12 @@ Update
$ hg update -r 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cat depot/Main/a
$ cat Main/a
a
$ hg update -r 1
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg update -r 2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cat depot/Main/A
$ cat Main/A
a
stopping the p4 server

View File

@ -105,14 +105,14 @@ Import
loading list of files.
1 files to import.
importing repository.
writing filelog: b8e02f643373, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/a (glob)
writing filelog: 059c099e8c05, p1 b8e02f643373, linkrev 1, 2 bytes, src: *, path: depot/Main/a (glob)
writing filelog: de9e19b2b7a1, p1 059c099e8c05, linkrev 2, 2 bytes, src: *, path: depot/Main/a (glob)
changelist 1: writing manifest. node: 42bd0cc6c882 p1: 000000000000 p2: 000000000000 linkrev: 0
writing filelog: b8e02f643373, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/a (glob)
writing filelog: 059c099e8c05, p1 b8e02f643373, linkrev 1, 2 bytes, src: *, path: Main/a (glob)
writing filelog: de9e19b2b7a1, p1 059c099e8c05, linkrev 2, 2 bytes, src: *, path: Main/a (glob)
changelist 1: writing manifest. node: ce8f3d0156f3 p1: 000000000000 p2: 000000000000 linkrev: 0
changelist 1: writing changelog: CL1(1)
changelist 3: writing manifest. node: 6200a3b4ac89 p1: 42bd0cc6c882 p2: 000000000000 linkrev: 1
changelist 3: writing manifest. node: 63f2b10f26c4 p1: ce8f3d0156f3 p2: 000000000000 linkrev: 1
changelist 3: writing changelog: CL3(3)
changelist 4: writing manifest. node: 4b051904a3a3 p1: 6200a3b4ac89 p2: 000000000000 linkrev: 2
changelist 4: writing manifest. node: c654b16ed766 p1: 63f2b10f26c4 p2: 000000000000 linkrev: 2
changelist 4: writing changelog: CL4(2)
3 revision(s), 1 file(s) imported.
$ hg verify
@ -121,6 +121,6 @@ Import
crosschecking files in changesets and manifests
checking files
1 files, 3 changesets, 3 total revisions
$ hg cat -r tip depot/Main/a
$ hg cat -r tip Main/a
4
stopping the p4 server

View File

@ -0,0 +1,109 @@
#require p4
$ echo "[extensions]" >> $HGRCPATH
$ echo "p4fastimport= " >> $HGRCPATH
create p4 depot
$ p4wd=`pwd`/p4
$ hgwd=`pwd`/hg
$ P4ROOT=`pwd`/depot; export P4ROOT
$ P4AUDIT=$P4ROOT/audit; export P4AUDIT
$ P4JOURNAL=$P4ROOT/journal; export P4JOURNAL
$ P4LOG=$P4ROOT/log; export P4LOG
$ P4PORT=localhost:$HGPORT; export P4PORT
$ P4DEBUG=1; export P4DEBUG
$ mkdir $hgwd
$ mkdir $p4wd
$ cd $p4wd
start the p4 server
$ [ ! -d $P4ROOT ] && mkdir $P4ROOT
$ p4d -f -J off >$P4ROOT/stdout 2>$P4ROOT/stderr &
$ echo $! >> $DAEMON_PIDS
$ trap "echo stopping the p4 server ; p4 admin stop" EXIT
$ # wait for the server to initialize
$ while ! p4 ; do
> sleep 1
> done >/dev/null 2>/dev/null
create a client spec
$ cd $p4wd
$ P4CLIENT=hg-p4-import; export P4CLIENT
$ DEPOTPATH=//depot/Main/...
$ p4 client -o | sed '/^View:/,$ d' >p4client
$ echo View: >>p4client
$ echo " $DEPOTPATH //$P4CLIENT/..." >>p4client
$ p4 client -i <p4client
Client hg-p4-import saved.
populate the depot
$ mkdir b
$ echo a > a
$ echo c > b/c
$ echo d > d
$ p4 add a b/c d
//depot/Main/a#1 - opened for add
//depot/Main/b/c#1 - opened for add
//depot/Main/d#1 - opened for add
$ p4 submit -d initial
Submitting change 1.
Locking 3 files ...
add //depot/Main/a#1
add //depot/Main/b/c#1
add //depot/Main/d#1
Change 1 submitted.
$ p4 edit a b/c d
//depot/Main/a#1 - opened for edit
//depot/Main/b/c#1 - opened for edit
//depot/Main/d#1 - opened for edit
$ echo a >> a
$ echo c >> b/c
$ echo d >> d
$ p4 submit -d second
Submitting change 2.
Locking 3 files ...
edit //depot/Main/a#2
edit //depot/Main/b/c#2
edit //depot/Main/d#2
Change 2 submitted.
Simple import
$ cd $hgwd
$ hg init --config 'format.usefncache=False'
$ hg p4fastimport --debug -P $P4ROOT hg-p4-import
loading changelist numbers.
2 changelists to import.
loading list of files.
3 files to import.
importing repository.
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: a (glob)
writing filelog: a80d06849b33, p1 b789fdd96dc2, linkrev 1, 4 bytes, src: *, path: a (glob)
writing filelog: 149da44f2a4e, p1 000000000000, linkrev 0, 2 bytes, src: *, path: b/c (glob)
writing filelog: b11e10a88bfa, p1 149da44f2a4e, linkrev 1, 4 bytes, src: *, path: b/c (glob)
writing filelog: a9092a3d84a3, p1 000000000000, linkrev 0, 2 bytes, src: *, path: d (glob)
writing filelog: f83f0637e55e, p1 a9092a3d84a3, linkrev 1, 4 bytes, src: *, path: d (glob)
changelist 1: writing manifest. node: 096669767a87 p1: 000000000000 p2: 000000000000 linkrev: 0
changelist 1: writing changelog: initial
changelist 2: writing manifest. node: 5b4fb7a7d302 p1: 096669767a87 p2: 000000000000 linkrev: 1
changelist 2: writing changelog: second
2 revision(s), 3 file(s) imported.
Verify
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
3 files, 2 changesets, 6 total revisions
$ hg update tip
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
End Test
stopping the p4 server

View File

@ -83,15 +83,15 @@ Simple import
loading list of files.
3 files to import.
importing repository.
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/a (glob)
writing filelog: f9597ff22e3f, p1 b789fdd96dc2, linkrev 2, 2 bytes, src: *, path: depot/Main/a (glob)
writing filelog: 149da44f2a4e, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/b/c (glob)
writing filelog: a9092a3d84a3, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/d (glob)
changelist 1: writing manifest. node: 17971aea5e86 p1: 000000000000 p2: 000000000000 linkrev: 0
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/a (glob)
writing filelog: f9597ff22e3f, p1 b789fdd96dc2, linkrev 2, 2 bytes, src: *, path: Main/a (glob)
writing filelog: 149da44f2a4e, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/b/c (glob)
writing filelog: a9092a3d84a3, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/d (glob)
changelist 1: writing manifest. node: a9f7e8df2a65 p1: 000000000000 p2: 000000000000 linkrev: 0
changelist 1: writing changelog: initial
changelist 2: writing manifest. node: 6b6c47cf17c5 p1: 17971aea5e86 p2: 000000000000 linkrev: 1
changelist 2: writing manifest. node: 572c24bb3dc1 p1: a9f7e8df2a65 p2: 000000000000 linkrev: 1
changelist 2: writing changelog: second
changelist 3: writing manifest. node: ae40cd4cee98 p1: 6b6c47cf17c5 p2: 000000000000 linkrev: 2
changelist 3: writing manifest. node: f1f6d03759eb p1: 572c24bb3dc1 p2: 000000000000 linkrev: 2
changelist 3: writing changelog: third
3 revision(s), 3 file(s) imported.

View File

@ -81,15 +81,15 @@ Simple import
loading list of files.
3 files to import.
importing repository.
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/a (glob)
writing filelog: a80d06849b33, p1 b789fdd96dc2, linkrev 1, 4 bytes, src: *, path: depot/Main/a (glob)
writing filelog: 149da44f2a4e, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/b/c (glob)
writing filelog: b11e10a88bfa, p1 149da44f2a4e, linkrev 1, 4 bytes, src: *, path: depot/Main/b/c (glob)
writing filelog: a9092a3d84a3, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/d (glob)
writing filelog: f83f0637e55e, p1 a9092a3d84a3, linkrev 1, 4 bytes, src: *, path: depot/Main/d (glob)
changelist 1: writing manifest. node: 17971aea5e86 p1: 000000000000 p2: 000000000000 linkrev: 0
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/a (glob)
writing filelog: a80d06849b33, p1 b789fdd96dc2, linkrev 1, 4 bytes, src: *, path: Main/a (glob)
writing filelog: 149da44f2a4e, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/b/c (glob)
writing filelog: b11e10a88bfa, p1 149da44f2a4e, linkrev 1, 4 bytes, src: *, path: Main/b/c (glob)
writing filelog: a9092a3d84a3, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/d (glob)
writing filelog: f83f0637e55e, p1 a9092a3d84a3, linkrev 1, 4 bytes, src: *, path: Main/d (glob)
changelist 1: writing manifest. node: a9f7e8df2a65 p1: 000000000000 p2: 000000000000 linkrev: 0
changelist 1: writing changelog: initial
changelist 2: writing manifest. node: ee5866cdbad7 p1: 17971aea5e86 p2: 000000000000 linkrev: 1
changelist 2: writing manifest. node: e2b9d9177f8d p1: a9f7e8df2a65 p2: 000000000000 linkrev: 1
changelist 2: writing changelog: second
2 revision(s), 3 file(s) imported.
@ -127,12 +127,12 @@ Incremental import
loading list of files.
2 files to import.
importing repository.
writing filelog: 544ee3484b75, p1 a80d06849b33, linkrev 2, 6 bytes, src: *, path: depot/Main/a (glob)
writing filelog: c96a7bc5f25b, p1 544ee3484b75, linkrev 3, 8 bytes, src: *, path: depot/Main/a (glob)
writing filelog: b7282976f1b3, p1 b11e10a88bfa, linkrev 2, 6 bytes, src: *, path: depot/Main/b/c (glob)
changelist 3: writing manifest. node: 7357c6fa87bd p1: ee5866cdbad7 p2: 000000000000 linkrev: 2
writing filelog: 544ee3484b75, p1 a80d06849b33, linkrev 2, 6 bytes, src: *, path: Main/a (glob)
writing filelog: c96a7bc5f25b, p1 544ee3484b75, linkrev 3, 8 bytes, src: *, path: Main/a (glob)
writing filelog: b7282976f1b3, p1 b11e10a88bfa, linkrev 2, 6 bytes, src: *, path: Main/b/c (glob)
changelist 3: writing manifest. node: 638e8977b4e8 p1: e2b9d9177f8d p2: 000000000000 linkrev: 2
changelist 3: writing changelog: third
changelist 4: writing manifest. node: a08ce793cc8b p1: 7357c6fa87bd p2: 000000000000 linkrev: 3
changelist 4: writing manifest. node: 06cd79ae413e p1: 638e8977b4e8 p2: 000000000000 linkrev: 3
changelist 4: writing changelog: fourth
2 revision(s), 2 file(s) imported.

View File

@ -88,17 +88,17 @@ Simple import
loading list of files.
3 files to import.
importing repository.
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/a (glob)
writing filelog: a80d06849b33, p1 b789fdd96dc2, linkrev 1, 4 bytes, src: *, path: depot/Main/a (glob)
writing filelog: 149da44f2a4e, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/b/c (glob)
writing filelog: b11e10a88bfa, p1 149da44f2a4e, linkrev 1, 4 bytes, src: *, path: depot/Main/b/c (glob)
writing filelog: b3a729dd094e, p1 000000000000, linkrev 0, 44 bytes, src: *, path: depot/Main/largefile (glob)
largefile: depot/Main/largefile, oid: 37a7b43abd9e105a0e6b22088b140735a02f288767fe7a6f4f436cb46b064ca9
writing filelog: 9f14f96519e1, p1 b3a729dd094e, linkrev 1, 88 bytes, src: rcs, path: depot/Main/largefile (glob)
largefile: depot/Main/largefile, oid: b0d5c1968efbabbff9d94160f284cd7b52686ca3c46cfffdd351de07384fce9c
changelist 1: writing manifest. node: cf415e4cf97d p1: 000000000000 p2: 000000000000 linkrev: 0
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/a (glob)
writing filelog: a80d06849b33, p1 b789fdd96dc2, linkrev 1, 4 bytes, src: *, path: Main/a (glob)
writing filelog: 149da44f2a4e, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/b/c (glob)
writing filelog: b11e10a88bfa, p1 149da44f2a4e, linkrev 1, 4 bytes, src: *, path: Main/b/c (glob)
writing filelog: b3a729dd094e, p1 000000000000, linkrev 0, 44 bytes, src: *, path: Main/largefile (glob)
largefile: Main/largefile, oid: 37a7b43abd9e105a0e6b22088b140735a02f288767fe7a6f4f436cb46b064ca9
writing filelog: 9f14f96519e1, p1 b3a729dd094e, linkrev 1, 88 bytes, src: *, path: Main/largefile (glob)
largefile: Main/largefile, oid: b0d5c1968efbabbff9d94160f284cd7b52686ca3c46cfffdd351de07384fce9c
changelist 1: writing manifest. node: 0637b0361958 p1: 000000000000 p2: 000000000000 linkrev: 0
changelist 1: writing changelog: initial
changelist 2: writing manifest. node: 282b5f441006 p1: cf415e4cf97d p2: 000000000000 linkrev: 1
changelist 2: writing manifest. node: 31c95d82cc49 p1: 0637b0361958 p2: 000000000000 linkrev: 1
changelist 2: writing changelog: second
writing lfs metadata to sqlite
2 revision(s), 3 file(s) imported.

View File

@ -81,15 +81,15 @@ Simple import
loading list of files.
3 files to import.
importing repository.
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/a (glob)
writing filelog: a80d06849b33, p1 b789fdd96dc2, linkrev 1, 4 bytes, src: *, path: depot/Main/a (glob)
writing filelog: 8aa36f7e9a8d, p1 000000000000, linkrev 0, 7 bytes, src: *, path: depot/Main/b/c (glob)
writing filelog: ee47780ebabc, p1 8aa36f7e9a8d, linkrev 1, 7 bytes, src: *, path: depot/Main/b/c (glob)
writing filelog: a9092a3d84a3, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/d (glob)
writing filelog: f83f0637e55e, p1 a9092a3d84a3, linkrev 1, 4 bytes, src: *, path: depot/Main/d (glob)
changelist 1: writing manifest. node: 3baf19a7398a p1: 000000000000 p2: 000000000000 linkrev: 0
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/a (glob)
writing filelog: a80d06849b33, p1 b789fdd96dc2, linkrev 1, 4 bytes, src: *, path: Main/a (glob)
writing filelog: 8aa36f7e9a8d, p1 000000000000, linkrev 0, 7 bytes, src: *, path: Main/b/c (glob)
writing filelog: ee47780ebabc, p1 8aa36f7e9a8d, linkrev 1, 7 bytes, src: *, path: Main/b/c (glob)
writing filelog: a9092a3d84a3, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/d (glob)
writing filelog: f83f0637e55e, p1 a9092a3d84a3, linkrev 1, 4 bytes, src: *, path: Main/d (glob)
changelist 1: writing manifest. node: 9b06e09b6cf9 p1: 000000000000 p2: 000000000000 linkrev: 0
changelist 1: writing changelog: initial
changelist 2: writing manifest. node: 204ea7b19daa p1: 3baf19a7398a p2: 000000000000 linkrev: 1
changelist 2: writing manifest. node: d5f0551e02e2 p1: 9b06e09b6cf9 p2: 000000000000 linkrev: 1
changelist 2: writing changelog: second
2 revision(s), 3 file(s) imported.
@ -105,9 +105,9 @@ Verify
$ hg update tip
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg --debug manifest
a80d06849b333b8a3d5c445f8ba3142010dcdc9e 644 depot/Main/a
ee47780ebabc4dd227d21ef3b71ca3ab381eb4cf 644 @ depot/Main/b/c
f83f0637e55e3c48e9922f14a016761626d79d3d 755 * depot/Main/d
a80d06849b333b8a3d5c445f8ba3142010dcdc9e 644 Main/a
ee47780ebabc4dd227d21ef3b71ca3ab381eb4cf 644 @ Main/b/c
f83f0637e55e3c48e9922f14a016761626d79d3d 755 * Main/d
End Test

View File

@ -89,9 +89,9 @@ Simple import
writing filelog: * (glob)
writing filelog: * (glob)
writing filelog: * (glob)
changelist 1: writing manifest. node: 17971aea5e86 p1: 000000000000 p2: 000000000000 linkrev: 0
changelist 1: writing manifest. node: a9f7e8df2a65 p1: 000000000000 p2: 000000000000 linkrev: 0
changelist 1: writing changelog: initial
changelist 2: writing manifest. node: ee5866cdbad7 p1: 17971aea5e86 p2: 000000000000 linkrev: 1
changelist 2: writing manifest. node: e2b9d9177f8d p1: a9f7e8df2a65 p2: 000000000000 linkrev: 1
changelist 2: writing changelog: second
2 revision(s), 3 file(s) imported.

View File

@ -81,15 +81,15 @@ Simple import
loading list of files.
3 files to import.
importing repository.
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/a (glob)
writing filelog: a80d06849b33, p1 b789fdd96dc2, linkrev 1, 4 bytes, src: *, path: depot/Main/a (glob)
writing filelog: 149da44f2a4e, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/b/c (glob)
writing filelog: b11e10a88bfa, p1 149da44f2a4e, linkrev 1, 4 bytes, src: *, path: depot/Main/b/c (glob)
writing filelog: a9092a3d84a3, p1 000000000000, linkrev 0, 2 bytes, src: *, path: depot/Main/d (glob)
writing filelog: f83f0637e55e, p1 a9092a3d84a3, linkrev 1, 4 bytes, src: *, path: depot/Main/d (glob)
changelist 1: writing manifest. node: 17971aea5e86 p1: 000000000000 p2: 000000000000 linkrev: 0
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/a (glob)
writing filelog: a80d06849b33, p1 b789fdd96dc2, linkrev 1, 4 bytes, src: *, path: Main/a (glob)
writing filelog: 149da44f2a4e, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/b/c (glob)
writing filelog: b11e10a88bfa, p1 149da44f2a4e, linkrev 1, 4 bytes, src: *, path: Main/b/c (glob)
writing filelog: a9092a3d84a3, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/d (glob)
writing filelog: f83f0637e55e, p1 a9092a3d84a3, linkrev 1, 4 bytes, src: *, path: Main/d (glob)
changelist 1: writing manifest. node: a9f7e8df2a65 p1: 000000000000 p2: 000000000000 linkrev: 0
changelist 1: writing changelog: initial
changelist 2: writing manifest. node: ee5866cdbad7 p1: 17971aea5e86 p2: 000000000000 linkrev: 1
changelist 2: writing manifest. node: e2b9d9177f8d p1: a9f7e8df2a65 p2: 000000000000 linkrev: 1
changelist 2: writing changelog: second
2 revision(s), 3 file(s) imported.