patchbomb: extract 'getdescription' closure in its own function
Keep marching toward the promised land of simplification!
patchbomb: extract 'getbundle' closure in its own function
Keep marching toward the promised land of simplification!
patchbomb: extract 'getpatches' closure in its own function
Keep marching toward the promised land of simplification!
patchbomb: extract 'getoutgoing' closure into its own function
The patchbomb command is a gigantic 300 line function full of closures. As a
first step to simplify it in smaller bits, I'm extracting the closures into full
featured functions. The first victim is 'getoutgoing'. It gains a docstring in
the process.
bundle2: handle empty 'b2x:changegroup' value in push and pull
Changeset
e4dc2b0be056 added advertising of supported changegroup version
through the new 'b2x:changegroup' capability. However, this capability is not
new and has been around since 3.1 with an empty value. This makes new clients
unable to push to 3.2 servers through bundle2 as they cannot find a common
changegroup version to use from and empty list.
Treating empty 'b2x:changegroup' value as old client fixes it.
bundle2: drop duplicated definition of 'b2x:exchange'
This bundle2 capability is going to be dynamically computed in 'getrepocaps'. We
do not need to include it in the static value.
convert: use git diff-tree -Cn% instead of --find-copies=n% for older git
The option --find-copies was added in a later git version than the one included
in Debian squeeze-lts (1.7.2.5), probably around 1.7.4.
changelog: rely on transaction for finalization
Instead of calling 'cl.finalize()' by hand (possibly at a bogus time) we
register it in the transaction during 'delayupdate' and rely on 'tr.close()' to
call it at the right time.
transaction: allow registering a finalization callback
The new 'addfinalize' method allows people to register a callback to
be triggered when the transaction is closed. This aims to get rid of
explicit calls to 'changelog.finalize'. This also obsoletes the
'onclose' function but removing it is not in the scope of this series.
changelog: handle writepending in the transaction
The 'delayupdate' method now takes a transaction object and registers its
'_writepending' method for execution in 'transaction.writepending()'. The hook can then
use 'transaction.writepending()' directly.
At some point this will allow the addition of other file creation
during writepending.