# HG changeset patch # User Vadim Gelfer # Date 1150907551 25200 # Node ID 7a77934ece466cc4680b7dc83cb2a605ede44a8e # Parent 1e32e2fe8a677c391049d40b8794478976a0a914# Parent 6904e1ef8ad16202c03e488eb8faa59eaabe2a93 merge with crew. diff -r 6904e1ef8ad1 -r 7a77934ece46 mercurial/commands.py --- a/mercurial/commands.py Tue Jun 20 23:58:45 2006 -0700 +++ b/mercurial/commands.py Wed Jun 21 09:32:31 2006 -0700 @@ -2151,7 +2151,6 @@ with the --ssh command line option. """ source = ui.expandpath(source) - ui.status(_('pulling from %s\n') % (source)) if opts['ssh']: ui.setconfig("ui", "ssh", opts['ssh']) @@ -2159,6 +2158,7 @@ ui.setconfig("ui", "remotecmd", opts['remotecmd']) other = hg.repository(ui, source) + ui.status(_('pulling from %s\n') % (source)) revs = None if opts['rev'] and not other.local(): raise util.Abort(_("pull -r doesn't work for remote repositories yet")) @@ -2190,7 +2190,6 @@ about ssh:// URLs. """ dest = ui.expandpath(dest) - ui.status('pushing to %s\n' % (dest)) if opts['ssh']: ui.setconfig("ui", "ssh", opts['ssh']) @@ -2198,6 +2197,7 @@ ui.setconfig("ui", "remotecmd", opts['remotecmd']) other = hg.repository(ui, dest) + ui.status('pushing to %s\n' % (dest)) revs = None if opts['rev']: revs = [repo.lookup(rev) for rev in opts['rev']] diff -r 6904e1ef8ad1 -r 7a77934ece46 mercurial/hg.py --- a/mercurial/hg.py Tue Jun 20 23:58:45 2006 -0700 +++ b/mercurial/hg.py Wed Jun 21 09:32:31 2006 -0700 @@ -10,6 +10,7 @@ from demandload import * from i18n import gettext as _ demandload(globals(), "localrepo bundlerepo httprepo sshrepo statichttprepo") +demandload(globals(), "os util") def bundle(ui, path): if path.startswith('bundle://'): @@ -28,6 +29,8 @@ return httprepo.httprepository(ui, path.replace("hg://", "http://")) def local_(ui, path, create=0): + if path.startswith('file:'): + path = path[5:] return localrepo.localrepository(ui, path, create) def old_http(ui, path): @@ -40,7 +43,7 @@ return statichttprepo.statichttprepository( ui, path.replace("static-http://", "http://")) -protocols = { +schemes = { 'bundle': bundle, 'file': local_, 'hg': hg, @@ -49,7 +52,6 @@ 'old-http': old_http, 'ssh': lambda ui, path: sshrepo.sshrepository(ui, path), 'static-http': static_http, - None: local_, } def repository(ui, path=None, create=0): @@ -57,14 +59,11 @@ if scheme: c = scheme.find(':') scheme = c >= 0 and scheme[:c] - if not scheme: scheme = None try: - ctor = protocols[scheme] + ctor = schemes.get(scheme) or schemes['file'] if create: return ctor(ui, path, create) return ctor(ui, path) - except KeyError: - raise util.Abort(_('protocol "%s" not known') % scheme) except TypeError: raise util.Abort(_('cannot create new repository over "%s" protocol') % - (scheme or 'file')) + scheme) diff -r 6904e1ef8ad1 -r 7a77934ece46 mercurial/localrepo.py --- a/mercurial/localrepo.py Tue Jun 20 23:58:45 2006 -0700 +++ b/mercurial/localrepo.py Wed Jun 21 09:32:31 2006 -0700 @@ -617,7 +617,11 @@ del mf[fn] return mf - if node1: + compareworking = False + if not node1 or node1 == self.dirstate.parents()[0]: + compareworking = True + + if not compareworking: # read the manifest from node1 before the manifest from node2, # so that we'll hit the manifest cache if we're going through # all the revisions in parent->child order. @@ -634,7 +638,7 @@ self.dirstate.changes(files, match, show_ignored)) # are we comparing working dir against its parent? - if not node1: + if compareworking: if lookup: # do a full compare of any files that might have changed mf2 = mfmatches(self.dirstate.parents()[0]) @@ -657,11 +661,15 @@ deleted, unknown, ignored = [], [], [] mf2 = mfmatches(node2) - if node1: + if not compareworking: # flush lists from dirstate before comparing manifests modified, added = [], [] - for fn in mf2: + # make sure to sort the files so we talk to the disk in a + # reasonable order + mf2keys = mf2.keys() + mf2keys.sort() + for fn in mf2keys: if mf1.has_key(fn): if mf1[fn] != mf2[fn] and (mf2[fn] != "" or fcmp(fn, mf1)): modified.append(fn) diff -r 6904e1ef8ad1 -r 7a77934ece46 mercurial/sshrepo.py --- a/mercurial/sshrepo.py Tue Jun 20 23:58:45 2006 -0700 +++ b/mercurial/sshrepo.py Wed Jun 21 09:32:31 2006 -0700 @@ -18,7 +18,7 @@ m = re.match(r'ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?', path) if not m: - raise hg.RepoError(_("couldn't parse destination %s") % path) + raise hg.RepoError(_("couldn't parse location %s") % path) self.user = m.group(2) self.host = m.group(3)