Mercurial > hg-stable
changeset 191:d7e859cf2f1b
merge: add count of new manifests, files, and revisions
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
merge: add count of new manifests, files, and revisions
manifest hash: ff29e3124693a0172ac936fac03fd73cc91778f5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCmfrjywK+sNU5EO8RAnHZAJ4gwnv4QUipIcP2PhyFVS1lXh9TQwCgipSi
r+6d9lUHu2U9UJGFkJPyi/4=
=Caod
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Sun, 29 May 2005 09:24:51 -0800 |
parents | 3dd5ce2fddb6 |
children | 5d8553352d2e |
files | mercurial/hg.py |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hg.py Sun May 29 09:06:43 2005 -0800 +++ b/mercurial/hg.py Sun May 29 09:24:51 2005 -0800 @@ -637,6 +637,8 @@ yield "".join([l, f, g]) def addchangegroup(self, generator): + changesets = files = revisions = 0 + self.lock() class genread: def __init__(self, generator): @@ -674,12 +676,17 @@ co = self.changelog.tip() cn = self.changelog.addgroup(csg, report, tr) + revisions = self.changelog.rev(cn) - self.changelog.rev(co) + changesets = revisions + self.ui.status("adding manifests\n") # pull off the manifest group mfg = getchunk() mm = self.manifest.tip() mo = self.manifest.addgroup(mfg, lambda x: self.changelog.rev(x), tr) + revisions += self.manifest.rev(mo) - self.manifest.rev(mm) + # do we need a resolve? if self.changelog.ancestor(co, cn) != co: simple = False @@ -749,6 +756,8 @@ fl = self.file(f) o = fl.tip() n = fl.addgroup(fg, lambda x: self.changelog.rev(x), tr) + revisions += fl.rev(n) - fl.rev(o) + files += 1 if f in need: del need[f] # manifest resolve determined we need to merge the tips @@ -760,14 +769,19 @@ if f not in need: continue fl = self.file(f) nmap[f] = self.merge3(fl, f, need[f], fl.tip(), tr, resolverev) + revisions += 1 # For simple merges, we don't need to resolve manifests or changesets if simple: self.ui.debug("simple merge, skipping resolve\n") + self.ui.status(("added %d changesets, %d files," + + " and %d new revisions\n") + % (changesets, files, revisions)) tr.close() return node = self.manifest.add(nmap, tr, resolverev, mm, mo) + revisions += 1 # Now all files and manifests are merged, we add the changed files # and manifest id to the changelog @@ -779,6 +793,10 @@ "".join(["HG: changed %s\n" % f for f in new]) edittext = self.ui.edit(edittext) n = self.changelog.add(node, new, edittext, tr, co, cn) + revisions += 1 + + self.ui.status("added %d changesets, %d files, and %d new revisions\n" + % (changesets, files, revisions)) tr.close()