addremove: print relative paths when called with -I/-X (BC)

For "hg addremove 'glob:*.py'", we print any paths added or removed as
relative to the current directory, but when "hg addremove -I
'glob:*.py'" is used, we use the absolute path (relative from the repo
root). It seems like they should be the same, so change it so we use
relative paths in both cases. Continue to use absolute paths when no
patterns are given.

--HG--
extra : amend_source : 68a0ca3fe56addc7e06a39e17e8ec23dc68ede36
extra : histedit_source : aab642273bf222190fac932d433e368656aed300
largefiles: split the creation of a normal matcher out of its install method

Refactoring addremove to support subrepos will need the ability to keep passing
the same matcher and narrowing it, instead of monkey patching scmutil's matcher.

--HG--
extra : histedit_source : f755fd41f75b8b8e1123d4e6ed60d3906a179f85
patch.diffopts: use a dict for initialization

In upcoming patches we'll conditionally add to and remove from the dict.

--HG--
extra : histedit_source : bad7c3640e529eed33ad5265ef7be1df3268fe7c
patch: add a new function to initialize diffopts by feature

Not all callers are interested in all diffopts -- for example, commands like
record (which use diff internally) break when diffopts like noprefix are
enabled. This function will allow us to add flags that callers can use to
enable only the features they're interested in.

--HG--
extra : histedit_source : 097592d95c8288cce5614ddad513e08d68f5ce3b
patch: rename diffopts to diffallopts

This is meant to be used when all features are explicitly requested. diffopts
is kept as an alias for now -- it will go away soon.

--HG--
extra : histedit_source : 5e6671eeb83996a9492ffb7201e1fc087da99a32
patch.difffeatureopts: add a feature for diff.git

This deserves to be its own feature -- indeed, this is often the only feature
several commands care about.

--HG--
extra : histedit_source : 19126c3fc3e1a5d72e896e4db0f5c3d1e182cf3b
patch.difffeatureopts: add a feature for whitespace diffopts

These aren't exactly format-breaking features -- just ones for which patches
applied to a repo will produce incorrect commits, In any case, some commands
like record and annotate only care about this feature.

--HG--
extra : histedit_source : 935bc6c458d7928f5b2752287c72783138277e23
patch.difffeatureopts: add a feature for format-changing diffopts

Typically, callers that are interested in this set are also interested in the
others. We still add it as a first-class flag for convenience.

--HG--
extra : histedit_source : 302f66a33e607f052e0d35e90f7b6ce71f780eeb
record: don't honor format-changing diffopts (issue4459)

record does support the whitespace options, so honor those. In upcoming patches
we'll replace all the other uses.

--HG--
extra : histedit_source : 7e1e6bef030262b1820203882bf89965ee57cd33
pull: extract transaction logic into separate object

This patch series is intended to allow bundle2 push reply part handlers to
make changes to the local repository; it has been developed in parallel with
an extension that allows the server to rebase incoming changesets while applying
them.

Aside from the transaction logic, the pulloperation class is used primarily as
a logic-free data structure for storing state information.  This diff extracts
the transaction logic into its own class that can be shared with push
operations.

--HG--
extra : rebase_source : cc789f9a8ce8dbf405a1125087b0b74ab28f5342
push: elevate phase transaction to cover entire operation

This patch series is intended to allow bundle2 push reply part handlers to
make changes to the local repository; it has been developed in parallel with
an extension that allows the server to rebase incoming changesets while applying
them.

Most pushes already open a transaction in order to sync phase information.
This diff replaces that transaction with one that spans the entire push
operation.

This transaction will be used in a later patch to guard repository changes
made during the reply handler.

--HG--
extra : rebase_source : a53e2d8609ce58f696f30a35a144bf996127b6a8
bundle2.processbundle: let callers request default behavior

This patch series is intended to allow bundle2 push reply part handlers to
make changes to the local repository; it has been developed in parallel with
an extension that allows the server to rebase incoming changesets while applying
them.

The default transaction getter for processbundle is a private function that
raises an exception; this diff lets calling code pass None as the transaction
getter to explicitly request this default behavior.

The next diff will check a config option to determine whether to provide a
transaction to the reply bundle processor.  If one shouldn't be provided, the
code needs a way to specify that the default behavior should be used.

--HG--
extra : rebase_source : 8b6d522ebf9329232c0963e4551d99207aafb09e
bundle2-push: provide transaction to reply unbundler

This patch series is intended to allow bundle2 push reply part handlers to
make changes to the local repository; it has been developed in parallel with
an extension that allows the server to rebase incoming changesets while applying
them.

This diff adds an experimental config option "bundle2.pushback" which provides
a transaction to the reply unbundler during a push operation.  This behavior is
opt-in because of potential security issues: the response can contain any part
type that has a handler defined, allowing the server to make arbitrary changes
to the local repository.

--HG--
extra : rebase_source : 48220d32f17e614ccfd94de48ff4ac5d3ddd882b