sapling/eden/scm/edenscm/hgext
Jun Wu ad6eb1928b treemanifest: make prefetchdraftparents non-fatal
Summary:
Not being able to prefetch draft parent trees should not be considered as a
fatal error.

This code path is causing trouble with narrow-heads clone:

1. Streaming clone. The client gets a changelog.
2. The client runs "pull" to get new commits. The prefetchdraftparents code path runs.
3. The client has stale remote names, and public() is lagging. `prefetchdraftparents`
   will try to fetch trees at the old master, but the repo is not configured properly.

That causes a stacktrace like:

  $ /usr/bin/hg --config 'extensions.fsmonitor=!' clone --shallow -U --config 'ui.ssh=ssh -oControlMaster=no' --configfile /etc/mercurial/repo-specific/www.rc ssh://hg.fb.com/repo repo
  connected to hg.fb.com
  streaming all changes
  searching for changes
  adding commits
  adding manifests
  adding file changes
  added 1 commits with 0 changes to 0 files  # <<<< No traceback if this says "0 commit".
  Traceback (most recent call last):
    File "edenscm/hgext/remotenames.py", line 1464, in exclonecmd
      orig(ui, *args, **opts)
    File "edenscm/hgext/remotefilelog/__init__.py", line 433, in cloneshallow
      orig(ui, repo, *args, **opts)
    File "edenscm/mercurial/commands/__init__.py", line 1615, in clone
      shareopts=shareopts,
      # shareopts = {'mode': 'identity'}
    File "edenscm/mercurial/hg.py", line 741, in clone
      exchange.pull(local, srcpeer, revs, streamclonerequested=stream)
    File "edenscm/mercurial/util.py", line 621, in __exit__
      self.close()
    File "edenscm/mercurial/transaction.py", line 46, in _active
      return func(self, *args, **kwds)
    File "edenscm/mercurial/transaction.py", line 543, in close
      self._postclosecallback[cat](self)
      # cat = bin('6472616674706172656e74747265656665746368')
    File "edenscm/hgext/treemanifest/__init__.py", line 490, in _parenttreefetch
      self.prefetchtrees([c.manifestnode() for c in draftparents])
      # c = <changectx b5ad643b3009>
      # draftparents = [<changectx b5ad643b3009>]
    File "edenscm/hgext/treemanifest/__init__.py", line 522, in prefetchtrees
      self._prefetchtrees("", mfnodes, basemfnodes, [], depth)
      # basemfnodes = [bin('a25f17018d7cd07f1f6bc3076f95c5980ba087a9')]
      # mfnodes = [bin('ad717aac7700e783a1d84f3330d13a7731a4726a')]
    File "edenscm/hgext/treemanifest/__init__.py", line 529, in _prefetchtrees
      fallbackpath = getfallbackpath(self)
    File "edenscm/hgext/treemanifest/__init__.py", line 2173, in getfallbackpath
      if util.safehasattr(repo, "fallbackpath"):
    File "edenscm/mercurial/util.py", line 190, in safehasattr
      return getattr(thing, attr, _notset) is not _notset
      # attr = 'fallbackpath'
    File "edenscm/mercurial/util.py", line 904, in __get__
      result = self.func(obj)
    File "edenscm/hgext/remotefilelog/shallowrepo.py", line 42, in fallbackpath
      "no remotefilelog server " "configured - is your .hg/hgrc trusted?"
  Abort: no remotefilelog server configured - is your .hg/hgrc trusted?
  abort: no remotefilelog server configured - is your .hg/hgrc trusted?

Fix it by making prefetchdraftparents non-fatal. This would hopefully unblock
narrow-heads rollout.

Reviewed By: xavierd

Differential Revision: D19957251

fbshipit-source-id: e65bbe6bf422776effe49055f7332ec538177a41
2020-02-18 17:36:54 -08:00
..
absorb fix_map 2020-01-28 18:24:56 -08:00
amend hg-py3: make amend-next/prev work 2020-02-03 17:05:34 -08:00
commitcloud commitcloud: log errors to scuba 2020-02-18 14:28:33 -08:00
convert New custom immutable revision object to track commit conversions: conversionrevision 2020-02-05 10:20:19 -08:00
extlib py3: fix test-fb-hgext-phabstatus.t 2020-02-17 14:52:39 -08:00
fastannotate py3: get fastannotate closer to passing 2020-02-17 14:52:40 -08:00
fsmonitor fsmonitor: catch watchman issue and fallback 2020-02-03 18:04:25 -08:00
hgevents hgevents: disable events during status 2020-01-29 10:30:22 -08:00
hggit context: add some type annotations 2020-02-03 07:35:32 -08:00
highlight Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
infinitepush py3: get several infinitepush tests passing 2020-02-17 14:52:36 -08:00
lfs py3: fix various lfs encoding issues 2020-02-17 14:52:30 -08:00
memcommit memcommit: refactor code to be pyre friendly 2020-01-30 20:08:34 -08:00
perfsuite py3: only use binary stdin/stdout/stderr 2020-02-03 18:26:57 -08:00
pushrebase py3: fix misc encoding errors that showed up in tests 2020-02-17 14:52:34 -08:00
remotefilelog py3: fix misc encoding errors that showed up in tests 2020-02-17 14:52:34 -08:00
repogenerator Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
snapshot pycompat: drop strkwargs / byteskwargs 2020-01-31 16:38:03 -08:00
treemanifest treemanifest: make prefetchdraftparents non-fatal 2020-02-18 17:36:54 -08:00
__init__.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
arcdiff.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
automv.py pycompat: drop strkwargs / byteskwargs 2020-01-31 16:38:03 -08:00
blackbox.py py3: switch blackbox to use pycompat.encodeutf8 2020-02-11 09:38:54 -08:00
catnotate.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
checkmessagehook.py hg-py3: make metaedit command work 2020-01-31 18:29:01 -08:00
checkserverbookmark.py util: remove redundant 'timed' function 2020-02-04 12:33:40 -08:00
chistedit.py fix_map 2020-01-28 18:24:56 -08:00
churn.py pycompat: drop strkwargs / byteskwargs 2020-01-31 16:38:03 -08:00
cleanobsstore.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
clienttelemetry.py clienttelemetry: report multiple server_hostnames 2020-02-13 00:48:25 -08:00
clindex.py typing: enable pyre 2019-12-04 10:55:00 -08:00
clindex.pyx py3/cython: set the language_level to 3str 2020-01-30 12:52:06 -08:00
clonebundles.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
commitextras.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
conflictinfo.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
copytrace.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
crdump.py fix_map 2020-01-28 18:24:56 -08:00
debugcommitmessage.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
debugshell.py py3: only use binary stdin/stdout/stderr 2020-02-03 18:26:57 -08:00
dialect.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
directaccess.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
dirsync.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
disablesymlinks.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
drop.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
edrecord.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
eol.py py3: fix eol 2020-02-17 14:52:40 -08:00
errorredirect.py tracing: upload stack traces and link it to our main data 2020-02-07 14:04:38 -08:00
extdiff.py pycompat: drop strkwargs / byteskwargs 2020-01-31 16:38:03 -08:00
extorder.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
extutil.py commitcloud: use our background spawning utility 2019-12-20 16:14:19 -08:00
fastlog.py rename fbconduit extension to fbscmquery 2019-12-13 03:23:25 -08:00
fbhistedit.py py3: fix histedit json parsing 2020-01-31 10:56:30 -08:00
fbscmquery.py hg-py3: make metaedit command work 2020-01-31 18:29:01 -08:00
fixcorrupt.py doctor: integrate fixcorrupt logic to repair changelog 2020-02-18 09:41:31 -08:00
generic_bisect.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
githelp.py hgext: add hg equivalent for 'git stash clear' 2020-02-03 12:59:46 -08:00
gitlookup.py py3: fix gitlookup 2020-02-17 14:52:38 -08:00
gitrevset.py py3: fix gitlookup 2020-02-17 14:52:38 -08:00
globalrevs.py pyre: add stub for "bindings" 2020-01-31 13:18:54 -08:00
gpg.py pycompat: drop sysbytes, sysstr, strurl, bytesurl 2020-01-31 17:59:53 -08:00
grepdiff.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
grpcheck.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
hgsql.py py3: only use binary stdin/stdout/stderr 2020-02-03 18:26:57 -08:00
hiddenerror.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
histedit.py py3: only use binary stdin/stdout/stderr 2020-02-03 18:26:57 -08:00
infinitepushbackup.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
interactiveui.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
journal.py py3: fix sparse 2020-02-17 14:52:38 -08:00
linkrevcache.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
logginghelper.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
lz4revlog.py pyre: add stub for "bindings" 2020-01-31 13:18:54 -08:00
mergedriver.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
morestatus.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
myparent.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
ownercheck.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
patchrmdir.py typing: enable pyre 2019-12-04 10:55:00 -08:00
patchrmdir.pyx py3/cython: set the language_level to 3str 2020-01-30 12:52:06 -08:00
phabdiff.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
phabstatus.py py3: enable more tests 2020-02-01 10:39:39 -08:00
phrevset.py py3: drop the use of re.LOCALE for some regexes 2020-01-28 14:32:30 -08:00
progressfile.py Update pyre version for eden 2019-12-20 16:14:21 -08:00
pullcreatemarkers.py pullcreatemarkers: print how many commits are marked as landed 2020-01-21 07:36:34 -08:00
rage.py rage: add debugmutation for recent draft commits 2020-02-17 06:41:04 -08:00
rebase.py hg-py3: fix restack-multidest/t and fold 2020-02-03 17:05:35 -08:00
remotenames.py remotenames: log when a node is missing 2020-02-13 00:23:54 -08:00
reset.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
sampling.py py3: move sampling to use mercurial.json 2020-02-18 09:36:28 -08:00
schemes.py py3: remove b prefix 2020-01-28 10:29:15 -08:00
sendunbundlereplay.py util: remove redundant 'timed' function 2020-02-04 12:33:40 -08:00
share.py mq: remove references about mq 2020-01-13 17:39:43 -08:00
shelve.py fix_map 2020-01-28 18:24:56 -08:00
sigtrace.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
simplecache.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
smartlog.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
sparse.py py3: fix sparse 2020-02-17 14:52:38 -08:00
sshaskpass.py typing: enable pyre 2019-12-04 10:55:00 -08:00
stablerev.py py3: fix stablerev tests 2020-02-17 14:52:38 -08:00
stat.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
traceprof.py typing: enable pyre 2019-12-04 10:55:00 -08:00
traceprof.pyx py3/cython: set the language_level to 3str 2020-01-30 12:52:06 -08:00
tweakdefaults.py rebase: prevent fast-foward rebases with conflicting changes 2020-01-06 15:06:50 -08:00
undo.py py3: decode undolog redonode 2020-01-31 15:27:31 -08:00
whereami.py Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
win32mbcs.py py3: move checkwinfilename() to a separate file and add type hints 2020-01-31 20:18:21 -08:00
win32text.py py3: fix eol 2020-02-17 14:52:40 -08:00