Eric Sumner <ericsumner@fb.com> [Wed, 14 Jan 2015 14:24:16 -0800] rev 24026
bundle2.unpackermixin: control for underlying file descriptor
This patch adds seek(), tell(), and close() implementations for unpackermixin
which forward to the file descriptor's implementation if possible. A future
patch will use this to make bundle2.unbundlepart seekable, which will in turn
make it usable as a file descriptor for bundlerepo.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 16 Jan 2015 15:34:03 -0800] rev 24025
trydiff: join elements in 'header' list by '\n'
It seems natural that each element in the list corresponds to one line
of output. That is currently true, but only because each element in
the list has a trailing newline. Let's drop those newlines and instead
add them when we print the headers.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 16 Jan 2015 15:27:04 -0800] rev 24024
trydiff: move check for quietness out of diffline()
By moving the condition out of diffline(), the call site becomes
clearer and diffline() no longer closes on any variables.
Note that this changes the value of the header variable from [''] to
[], but there is no difference in how these two are treated by the
following code. The new value seems more natural anyway.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 16 Jan 2015 15:22:29 -0800] rev 24023
trydiff: remove dead branch in diffline()
Since diffline() is never called when 'revs' is empty, it doesn't need
to handle that case.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 16 Jan 2015 15:19:57 -0800] rev 24022
trydiff: make 'revs' ignored if opts.git is set
Instead of setting revs=None to prevent the call to diffline() when
opts.git is set, explicitly do not call the function in the git case.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 16 Jan 2015 14:58:51 -0800] rev 24021
trydiff: remove unused argument to diffline()
Now that diffline no longer knows about copies/renames, it only needs
one argument for the path.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 16 Jan 2015 14:58:06 -0800] rev 24020
trydiff: move git-header code out of diffline function
This collects more of the code for writing git headers in a single
place and makes diffline() close on a few variables less.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 27 Jan 2015 09:22:59 -0500] rev 24019
_fm1readmarkers: generate list in C
This moves perfloadmarkers from
! result: 63866
! wall 0.239217 comb 0.250000 user 0.240000 sys 0.010000 (best of 42)
to
! result: 63866
! wall 0.218795 comb 0.210000 user 0.210000 sys 0.000000 (best of 46)
Augie Fackler <augie@google.com> [Tue, 20 Jan 2015 13:38:07 -0500] rev 24018
obsolete: use parsers.fm1readmarker if it exists for a ~38% perf win
This moves perfloadmarkers on my linux workstation (63494 markers from
mpm, crew, and myself) performance from
! wall 0.357657 comb 0.360000 user 0.350000 sys 0.010000 (best of 28)
to
! wall 0.222345 comb 0.220000 user 0.210000 sys 0.010000 (best of 41)
which is a pretty good improvement.
On my BSD machine, which is ancient and slow, before:
! wall 3.584964 comb 3.578125 user 3.539062 sys 0.039062 (best of 3)
after:
! wall 2.267974 comb 2.265625 user 2.195312 sys 0.070312 (best of 5)
I feel like we could do better by moving the whole generator function
into C, but I didn't want to tackle that right away.
Augie Fackler <augie@google.com> [Fri, 23 Jan 2015 15:11:25 -0500] rev 24017
parsers: add fm1readmarker
This lets us do most of the interesting work of parsing obsolete
markers in C, which should provide significant time savings.
Thanks to Martin von Zweigbergk for some cleanups on this code.