largefiles: drop the override for 'fetch'

The fetch extension has been calling cmdutil.bailifchanged() since a014fdc97154,
so this is redundant.  Add test coverage to prevent regression.  It doesn't look
like there is any testing for fetch with largefiles.

--HG--
extra : rebase_source : 58ea078179ca9db1ffd649c60555113a584f742a
mq: smarter handling of plain headers

6333412245ec and 5ccced6eab0b fixed issue4453 with a simple insertplainheader
function that fixed the regression but didn't make the implementation more
stable.

Now we introduce plain header handling similar to how we handle hg patches. The
whole header is scanned for fields to update while determining the best
position for inserting the field if it is missing. It also makes sure there is
an empty line between headers and body.

--HG--
extra : rebase_source : 48754ad573fbd3ff09702db6f909d5a1625408f8
mq: drop updateheader - inserthgheader and insertplainheader is enough

--HG--
extra : rebase_source : bf46a7f94553b34c1fb8297624ed2d57481259d9
merge: demonstrate that directory renames can lose local file content

When a directory has been renamed on the local branch and a file has
been added in the old location on a remote branch, we move that new
file to the new location. Unfortunately, if there is already a file
there, we overwrite it with the contents from the remote branch. For
untracked local files, we should probably abort, and for tracked local
files, we should merge the contents. To start with, let's add a test
to demonstrate the breakage. Also note that while files merged in from
a remote branch are normally (and unintuitively) reported as modified,
these files are reported as added.

--HG--
extra : rebase_source : d939f3895c59707c10b213f5c7fc058888b938ff
generate-working-copy-states: make 'tracked' a string

The only places the 'tracked' variable is only used is where it's
converted to a string, so let's simplify by using the string value
directly.

--HG--
extra : rebase_source : cbfb4b98d66bfbfef0569612a53f21ec1fd63505
generate-working-copy-states: generalize for depth

The script can currently generate filenames and contents for exactly
two changesets plus the working copy. For some tests (e.g. of plain
dirstate status), only one changeset is needed, while for others
(e.g. merge), three changesets are needed. Let's prepare for such
tests by generalizing the code for any number of changesets.

--HG--
extra : rebase_source : 086b233a2bfdca74f66b386c8d44c4b25d9aecbf
generate-working-copy-states: accept depth arguments on command line

Add a parameter to generate-working-copy-states.py that indicates
how many changesets are wanted. This number impacts all the
subcommands. The current 'filelist' subcommand becomes 'filelist 2',
the current 'base' and 'parent' subcommands become 'state 2 1' and
'state 2 2' respectively, while 'wc' becomes 'state 2 wc'.

See earlier patch for motivation.
merge: display modify/delete conflict prompts in sorted order

The order is determined by manifest.diff(), which currently is not
sorted. There are currently no tests for this, but we will soon add
some that would be flaky without this patch.

--HG--
extra : rebase_source : c670d128d6c22a1eaa0e90544d49fb9475d6a70a
merge: add more thorough tests for --force

With generate-working-copy-states.py generalized to support
arbitrarily many changesets, we can use it for generating test cases
for merge: use one changeset each for base, remote and local. With the
various working copy states, this is a total of 104 cases.

The first candidate for additional testing is 'hg merge --force'. Even
though the force option is deprecated, it is convenient for testing
because it can be tested without first needing to revert any
changes. Except for the lack of checking for uncommitted changes, it
differs in only a few cases from unforced merge.

The new tests cover all the cases in the existing test-merge-force.t,
except for the unforced merge case, which is covered in several other
files anyway, so nothing remains of the file after this patch.

--HG--
extra : rebase_source : 3154fc8d611d7837e23a4a6bcda99ec958907a6a
patchbomb: don't honor whitespace and format-changing diffopts (BC)

The whitespace diffopts break lossless transmission, and the format-changing
ones make import harder. We expect parsers to be able to read git-style diffs,
though.
hgk: don't honor whitespace and format-changing diffopts

The diff-tree command is a plumbing command in Git, which means it is expected
to have a stable output format. Ensure that our output is stable too.

--HG--
extra : rebase_source : b2327b8cf10075286a78c7822f676bf7983cfd18
transplant: don't honor whitespace and format-changing diffopts

transplant uses diff purely internally.

--HG--
extra : rebase_source : fabbbb54958ec921be076c15dd74d27ce8252e86
jsonchangeset: don't honor whitespace and format-changing diffopts

JSON is meant to be parsed by computers, and format changes can break them.

--HG--
extra : rebase_source : 0a855f42832c12ea0590cbf3ecdf4ea47245e744
notify: explicitly honor all diffopts

The notify output doesn't seem to be parseable anyway, what with the maxdiff
config option. Plus it is designed mainly for servers where hopefully the
admins are doing sensible things.

--HG--
extra : rebase_source : bb3db6f4174fce5ad16c1d52590ed0cb90b38de5
annotate: explicitly only honor whitespace diffopts

The whitespace ones are the only ones the annotate logic cares about anyway, so
there's no visible impact.

--HG--
extra : rebase_source : 1a4ad96d77b130f097dda84b78d55b62203ebd95
diff: explicitly honor all diffopts

'hg diff' should naturally honor all diffopts.

--HG--
extra : rebase_source : 19c676cf3d25ccf3d8f71c3b278051b99e3188f4
rebase: ignore negative state when updating back to original wc parent

The state mapping also contains some magic negative values (detached
parent, ignored revision). Blindly reading the state thus lead to
unfortunate usage of the negative value as an update destination. We
now filter them out.

We do a minor alteration of the test to catch this.

--HG--
branch : stable
merge with stable