Siddharth Agarwal <sid0@fb.com> [Sat, 02 Jan 2016 03:02:57 -0800] rev 27655
merge: add a new 'backup' argument to get actions
We're going to use this in an upcoming patch to back untracked files up when
they're replaced by tracked ones.
Siddharth Agarwal <sid0@fb.com> [Sat, 02 Jan 2016 03:02:57 -0800] rev 27654
_checkunknownfiles: turn 'conflicts' into a set
We'll check for membership in this set in an upcoming patch.
Siddharth Agarwal <sid0@fb.com> [Sat, 02 Jan 2016 03:02:57 -0800] rev 27653
checkunknownfiles: make control flow clearer
In particular, make it clear that we only check for and abort on conflicts if
force is not true.
Siddharth Agarwal <sid0@fb.com> [Sat, 02 Jan 2016 03:02:57 -0800] rev 27652
_checkunknownfiles: rename 'aborts' to 'conflicts'
In upcoming patches we'll be able to do more useful things than aborting.
Siddharth Agarwal <sid0@fb.com> [Sat, 02 Jan 2016 03:02:57 -0800] rev 27651
origpath: move from cmdutil to scmutil
This is a lower-level function so it doesn't need to be in cmdutil, and putting
it here avoids a bunch of potential import cycle issues.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 22 Nov 2015 17:57:35 -0800] rev 27650
revlog: remove unnecessary cache validation in _chunks
Previously, we likely called _chunkraw() multiple times in order to
ensure it didn't change out from under us. I'm pretty certain this code
had its origins in the days where we attempted to have thread safety of
localrepository and thus revlog instances.
revlog instances are already not thread safe for writing. And, as of
Mercurial 3.6, hgweb uses a separate localrepository instance per
request, so there should only be a single thread reading a revlog at
a time. We more or less decided that attempting to make classes like
revlog thread safe is a lost cause.
So, this patch removes thread safety from _chunks. As a result, we make
one less call into _chunkraw() when the initial read isn't serviced
by the cache. This translates to savings of 4 function calls overall
and possibly prevents the creation of an additional buffer view into the
cache. I doubt this translates into any real world performance wins
because decompression will almost certainly dwarf time spent in
_chunks(). But it does make the code simpler, so it is an improvement.
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 05 Jan 2016 19:51:51 -0800] rev 27649
revlog: return offset from _chunkraw()
A subsequent patch will refactor _chunks() and the calculation of the
offset will no longer occur in that function. Prepare by returning the
offset from _chunkraw().