Mercurial > hg
comparison mercurial/localrepo.py @ 10724:cb0a7faa29ea
progress: drop extra args for pos=None calls (issue2087)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 17 Mar 2010 18:15:16 -0500 |
parents | 7b0a0d498cc0 |
children | bedef1c228d3 |
comparison
equal
deleted
inserted
replaced
10723:8ea152e94484 | 10724:cb0a7faa29ea |
---|---|
1393 raise util.Abort(_("repository is unrelated")) | 1393 raise util.Abort(_("repository is unrelated")) |
1394 | 1394 |
1395 self.ui.debug("found new changesets starting at " + | 1395 self.ui.debug("found new changesets starting at " + |
1396 " ".join([short(f) for f in fetch]) + "\n") | 1396 " ".join([short(f) for f in fetch]) + "\n") |
1397 | 1397 |
1398 self.ui.progress(_('searching'), None, unit=_('queries')) | 1398 self.ui.progress(_('searching'), None) |
1399 self.ui.debug("%d total queries\n" % reqcnt) | 1399 self.ui.debug("%d total queries\n" % reqcnt) |
1400 | 1400 |
1401 return base.keys(), list(fetch), heads | 1401 return base.keys(), list(fetch), heads |
1402 | 1402 |
1403 def findoutgoing(self, remote, base=None, heads=None, force=False): | 1403 def findoutgoing(self, remote, base=None, heads=None, force=False): |
1826 cnt = 0 | 1826 cnt = 0 |
1827 for chnk in group: | 1827 for chnk in group: |
1828 yield chnk | 1828 yield chnk |
1829 self.ui.progress(_('bundling changes'), cnt, unit=_('chunks')) | 1829 self.ui.progress(_('bundling changes'), cnt, unit=_('chunks')) |
1830 cnt += 1 | 1830 cnt += 1 |
1831 self.ui.progress(_('bundling changes'), None, unit=_('chunks')) | 1831 self.ui.progress(_('bundling changes'), None) |
1832 | 1832 |
1833 | 1833 |
1834 # Figure out which manifest nodes (of the ones we think might be | 1834 # Figure out which manifest nodes (of the ones we think might be |
1835 # part of the changegroup) the recipient must know about and | 1835 # part of the changegroup) the recipient must know about and |
1836 # remove them from the changegroup. | 1836 # remove them from the changegroup. |
1854 cnt = 0 | 1854 cnt = 0 |
1855 for chnk in group: | 1855 for chnk in group: |
1856 yield chnk | 1856 yield chnk |
1857 self.ui.progress(_('bundling manifests'), cnt, unit=_('chunks')) | 1857 self.ui.progress(_('bundling manifests'), cnt, unit=_('chunks')) |
1858 cnt += 1 | 1858 cnt += 1 |
1859 self.ui.progress(_('bundling manifests'), None, unit=_('chunks')) | 1859 self.ui.progress(_('bundling manifests'), None) |
1860 | 1860 |
1861 # These are no longer needed, dereference and toss the memory for | 1861 # These are no longer needed, dereference and toss the memory for |
1862 # them. | 1862 # them. |
1863 msng_mnfst_lst = None | 1863 msng_mnfst_lst = None |
1864 msng_mnfst_set.clear() | 1864 msng_mnfst_set.clear() |
1903 if fname in msng_filenode_set: | 1903 if fname in msng_filenode_set: |
1904 # Don't need this anymore, toss it to free memory. | 1904 # Don't need this anymore, toss it to free memory. |
1905 del msng_filenode_set[fname] | 1905 del msng_filenode_set[fname] |
1906 # Signal that no more groups are left. | 1906 # Signal that no more groups are left. |
1907 yield changegroup.closechunk() | 1907 yield changegroup.closechunk() |
1908 self.ui.progress(_('bundling files'), None, unit=_('chunks')) | 1908 self.ui.progress(_('bundling files'), None) |
1909 | 1909 |
1910 if msng_cl_lst: | 1910 if msng_cl_lst: |
1911 self.hook('outgoing', node=hex(msng_cl_lst[0]), source=source) | 1911 self.hook('outgoing', node=hex(msng_cl_lst[0]), source=source) |
1912 | 1912 |
1913 return util.chunkbuffer(gengroup()) | 1913 return util.chunkbuffer(gengroup()) |
1955 cnt = 0 | 1955 cnt = 0 |
1956 for chnk in cl.group(nodes, identity, collect): | 1956 for chnk in cl.group(nodes, identity, collect): |
1957 self.ui.progress(_('bundling changes'), cnt, unit=_('chunks')) | 1957 self.ui.progress(_('bundling changes'), cnt, unit=_('chunks')) |
1958 cnt += 1 | 1958 cnt += 1 |
1959 yield chnk | 1959 yield chnk |
1960 self.ui.progress(_('bundling changes'), None, unit=_('chunks')) | 1960 self.ui.progress(_('bundling changes'), None) |
1961 | 1961 |
1962 mnfst = self.manifest | 1962 mnfst = self.manifest |
1963 nodeiter = gennodelst(mnfst) | 1963 nodeiter = gennodelst(mnfst) |
1964 cnt = 0 | 1964 cnt = 0 |
1965 for chnk in mnfst.group(nodeiter, lookuprevlink_func(mnfst)): | 1965 for chnk in mnfst.group(nodeiter, lookuprevlink_func(mnfst)): |
1966 self.ui.progress(_('bundling manifests'), cnt, unit=_('chunks')) | 1966 self.ui.progress(_('bundling manifests'), cnt, unit=_('chunks')) |
1967 cnt += 1 | 1967 cnt += 1 |
1968 yield chnk | 1968 yield chnk |
1969 self.ui.progress(_('bundling manifests'), None, unit=_('chunks')) | 1969 self.ui.progress(_('bundling manifests'), None) |
1970 | 1970 |
1971 cnt = 0 | 1971 cnt = 0 |
1972 for fname in sorted(changedfiles): | 1972 for fname in sorted(changedfiles): |
1973 filerevlog = self.file(fname) | 1973 filerevlog = self.file(fname) |
1974 if not len(filerevlog): | 1974 if not len(filerevlog): |
1982 for chnk in filerevlog.group(nodeiter, lookup): | 1982 for chnk in filerevlog.group(nodeiter, lookup): |
1983 self.ui.progress( | 1983 self.ui.progress( |
1984 _('bundling files'), cnt, item=fname, unit=_('chunks')) | 1984 _('bundling files'), cnt, item=fname, unit=_('chunks')) |
1985 cnt += 1 | 1985 cnt += 1 |
1986 yield chnk | 1986 yield chnk |
1987 self.ui.progress(_('bundling files'), None, unit=_('chunks')) | 1987 self.ui.progress(_('bundling files'), None) |
1988 | 1988 |
1989 yield changegroup.closechunk() | 1989 yield changegroup.closechunk() |
1990 | 1990 |
1991 if nodes: | 1991 if nodes: |
1992 self.hook('outgoing', node=hex(nodes[0]), source=source) | 1992 self.hook('outgoing', node=hex(nodes[0]), source=source) |