mercurial/localrepo.py
changeset 42669 36c692eb28d3
parent 42621 99ebde4fec99
child 42685 863e9e7f8850
equal deleted inserted replaced
42668:52a383451739 42669:36c692eb28d3
  1891 
  1891 
  1892             repo.hook('pretxnclose', throw=True,
  1892             repo.hook('pretxnclose', throw=True,
  1893                       **pycompat.strkwargs(tr.hookargs))
  1893                       **pycompat.strkwargs(tr.hookargs))
  1894         def releasefn(tr, success):
  1894         def releasefn(tr, success):
  1895             repo = reporef()
  1895             repo = reporef()
       
  1896             if repo is None:
       
  1897                 # If the repo has been GC'd (and this release function is being
       
  1898                 # called from transaction.__del__), there's not much we can do,
       
  1899                 # so just leave the unfinished transaction there and let the
       
  1900                 # user run `hg recover`.
       
  1901                 return
  1896             if success:
  1902             if success:
  1897                 # this should be explicitly invoked here, because
  1903                 # this should be explicitly invoked here, because
  1898                 # in-memory changes aren't written out at closing
  1904                 # in-memory changes aren't written out at closing
  1899                 # transaction, if tr.addfilegenerator (via
  1905                 # transaction, if tr.addfilegenerator (via
  1900                 # dirstate.write or so) isn't invoked while
  1906                 # dirstate.write or so) isn't invoked while