Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:50 -0800] rev 27841
with: use context manager in unshelveabort
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27840
with: use context manager for wlock in transplant
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27839
with: use context manager for wlock in shelve stripcmd
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27838
with: use context manager for lock in continue
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27837
with: use context manager for wlock in unshelve
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27836
with: use context manager for wlock in shelve deletecmd
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27835
with: use context manager for wlock in shelve cleanupcmd
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27834
with: use context manager for wlock in shelve createcmd
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27833
with: use context manager for lock in histedit cleanupnode
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27832
with: use context manager for lock in qimport
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27831
with: use context manager for wlock in qfold
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27830
with: use context manager for wlock in qrefresh
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27829
with: use context manager for wlock in qpop
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27828
with: use context manager for wlock in qpush
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27827
with: use context manager for wlock in qnew
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:47 -0800] rev 27826
with: use context manager for wlock in mergeupdate
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27825
with: use context manager for wlock in overridepurge
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27824
with: use context manager for wlock in cmdutilforget
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27823
with: use context manager for wlock in overriderevert
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27822
with: use context manager for wlock in removelargefiles
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27821
with: use context manager for wlock in addlargefiles
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27820
with: use context manager for wlock in updatelfiles
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27819
with: use context manager for wlock in kw_dorecord
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27818
with: use context manager for wlock in kw_copy
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27817
with: use context manager for wlock in kw_amend
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27816
with: use context manager for wlock in keyword demo
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27815
with: use context manager for wlock in _kwfwrite
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27814
with: use context manager for wlock in sign
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27813
with: use context manager for wlock in checklookup
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27812
with: use context manager for wlock in copy
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27811
with: use context manager for wlock in workingctx.undelete
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27810
with: use context manager for wlock in workingctx.forget
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27809
with: use context manager for wlock in workingctx.add
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27808
with: use context manager for wlock in graft
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27807
with: use context manager for wlock in debugsetparents
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27806
with: use context manager for wlock in debugrebuilddirstate
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27805
with: use context manager for wlock in copy
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27804
with: use context manager for wlock in branch
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:46 -0800] rev 27803
with: use context manager for wlock in revert
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:45 -0800] rev 27802
with: use context manager for wlock in remove
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:45 -0800] rev 27801
with: use context manager for wlock in recordinwlock
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:45 -0800] rev 27800
with: use context manager for wlock in _writeactive
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:45 -0800] rev 27799
with: use context manager for wlock in _writerepo
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:50 -0800] rev 27798
sshpeer: make remotelock a context manager
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:45 -0800] rev 27797
lock: turn a lock into a Python context manager
This lets us greatly simply acquire/release cycles.
Code pattern before:
try:
lock = repo.lock()
# zillions of lines of code
finally:
lock.release()
And after:
with repo.lock():
# ...
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:50 -0800] rev 27796
with: use context manager for I/O in changedfiles in patch
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:45 -0800] rev 27795
with: use context manager for file I/O in memusage
Bryan O'Sullivan <bryano@fb.com> [Fri, 15 Jan 2016 13:14:49 -0800] rev 27794
i18n: don't translate a transaction name