Commit Graph

3412 Commits

Author SHA1 Message Date
Felix Merk
f9fd057193 undo: include ancestor in preview 2017-08-23 18:50:25 -07:00
Jun Wu
d035699241 compat: add empty placeholder extensions
We still have config that enables bundle2hooks and commitextras extensions.
Keep them in the repo so users won't get warnings.
2017-08-23 14:33:56 -07:00
Jun Wu
26e7f4a998 split: only do checkunfinished if rebase is needed
It's a valid use-case to run split inside a histedit plan. The
checkunfinished was added by D161, which was caused by a user report that
the split changes got lost because of rebase failure. If there is no need to
rebase, then checkunfinished is not necessary.

In the future we might want a `splitstate` to make it harder to lose split
commits.

Differential Revision: https://phab.mercurial-scm.org/D488
2017-08-23 08:47:31 -07:00
Jun Wu
05c526a68e infinitepush: update test to reflect upstream change
It seems `debugcheckbackup` could get a new kind of error with the latest
upstream code:

  Traceback (most recent call last):
    File "hg/mercurial/scmutil.py", line 150, in callcatch
      return func()
    File "hg/mercurial/dispatch.py", line 292, in _runcatchfunc
      return _dispatch(req)
    File "hg/mercurial/dispatch.py", line 896, in _dispatch
      cmdpats, cmdoptions)
    File "hg/mercurial/dispatch.py", line 658, in runcommand
      ret = _runcommand(ui, options, cmd, d)
    File "hg/mercurial/dispatch.py", line 904, in _runcommand
      return cmdfunc()
    File "hg/mercurial/dispatch.py", line 893, in <lambda>
      d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
    File "hg/mercurial/util.py", line 1118, in check
      return func(*args, **kwargs)
    File "hg/mercurial/extensions.py", line 322, in closure
      return func(*(args + a), **kw)
    File "hg/mercurial/util.py", line 1118, in check
      return func(*args, **kwargs)
    File "hg/hgext/mq.py", line 3542, in mqcommand
      return orig(ui, repo, *args, **kwargs)
    File "hg/mercurial/util.py", line 1118, in check
      return func(*args, **kwargs)
    File "fb-hgext/infinitepush/backupcommands.py", line 272, in checkbackup
      if not _dobackupcheck(bkpstate, ui, repo, dest, **opts):
    File "fb-hgext/infinitepush/backupcommands.py", line 469, in _dobackupcheck
      for r in lookupresults:
    File "hg/mercurial/wireproto.py", line 137, in results
      next(batchable)
    File "hg/mercurial/wireproto.py", line 238, in lookup
      self._abort(error.RepoError(data))
    File "hg/mercurial/sshpeer.py", line 235, in _abort
      raise exception
  RepoError: 0e1a088ff2825213eaa838a82a842bc186f10dd5
  abort: 0e1a088ff2825213eaa838a82a842bc186f10dd5!

The error message only contains a commit hash, which is not friendly to be
printed out. Therefore make sure we have control about the error message and
update the test accordingly.

Differential Revision: https://phab.mercurial-scm.org/D485
2017-08-22 21:58:37 -07:00
Jun Wu
8ee06a4fb7 infinitepush: be compatible with latest changes
Upstream has renamed `cleanup` to `_cleanup`. Let's update our code.

Differential Revision: https://phab.mercurial-scm.org/D486
2017-08-22 21:58:37 -07:00
Jun Wu
ee4913c3f5 treemanifest: be compatible with latest changes
Upstream has renamed `_capabilities` to `capabilities`. Let's update our
code to be compatible with both versions.
2017-08-22 21:58:37 -07:00
Pulkit Goyal
9c86deebae pushvars: cleanup the extension to just set the server config option
The --pushvars option to push is moved to core with an extra config named
push.pushvars.server which defualts to False. This config controls whether the
server to unbundle the variables send by pushvars.

To make sure nothing breaks for those with pushvars extension enabled,
this should be added to the configuration file:

[push]
pushvars.server = True

Differential Revision: https://phab.mercurial-scm.org/D365
2017-08-23 09:28:07 +05:30
Pulkit Goyal
c288e6c436 bundle2hooks: remove the extension from hgext3rd as it is moved to core
The ability to add hookargs to a bundleoperation object has been added to the
core from this extension.

Related commits are:
https://www.mercurial-scm.org/repo/hg-committed/rev/bf6a06e6310e
https://www.mercurial-scm.org/repo/hg-committed/rev/aa97e972460f

Differential Revision: https://phab.mercurial-scm.org/D364
2017-08-23 09:28:07 +05:30
Pulkit Goyal
2930e709e9 commitextras: remove the extension from hgext3rd as it is moved to core
This extension is moved to core as an extension in
https://www.mercurial-scm.org/repo/hg/rev/bb5f26e8d735.

This patch also removes the test of the extension.

Differential Revision: https://phab.mercurial-scm.org/D363
2017-08-23 09:28:07 +05:30
Jun Wu
6f6c83a6af pyflakes: fix peermod unused error
When rewriting D425 to use `iterbatch()`, I forgot to remove the unused
import. This patch removes them.
2017-08-22 20:42:52 -07:00
Adam Simpkins
d76e68c663 sha1: allow selecting SHA-1 library at build time
Summary:
Add a #define which allows selecting between the sha1collisiondetection and
openssl SHA-1 implementations at build time.

For now setup.py always uses sha1collisiondetection, but we have some other
internal build environments where we will likely default to OpenSSL's SHA-1
implementation instead.

Test Plan: Confirmed the code builds and passes tests.

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D285
2017-08-22 19:09:07 -07:00
Adam Simpkins
8f31b2b18e sha1: use the real SHA-1 algorithm
Summary:
The sha1collisiondetection library by default performs its own "safe-hash"
algorithm, which is not actually the same as the normal SHA-1 algorithm.
For most inputs the output will be the actual SHA-1 hash, but if the input
happens to contain one of several known SHA-1 disturbance vectors this code
returns an alternate "safe-hash" output instead.

This updates the code to explicitly disable "safe-hash" mode and collision
detection, so that we always get actual SHA-1 hashes.

Test Plan: Ran the unit tests.

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D284
2017-08-22 19:09:07 -07:00
Adam Simpkins
2fe96efe2c sha1: update to the stable-v1.0.3 release of sha1collisiondetection
Summary:
Update the code to the stable-v1.0.3 release of sha1collisiondetection, and
include the upstream README file as well.

Test Plan: Confirmed the code builds and passes tests.

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D283
2017-08-22 19:09:07 -07:00
Adam Simpkins
5977867b68 sha1: provide wrapper functions around the SHA-1 implementation
Summary:
Add a clib/sha1.h file with SHA-1 utility functions that hide the details of
the underlying SHA-1 implementation being used.  This will make it easier in
the future if we want to use the faster SHA-1 implementation from OpenSSL if it
is available, but fall back to the sha1collisiondetection library if it is not
available.

Test Plan: Confirmed the code builds and passes unit tests.

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D282
2017-08-22 19:09:07 -07:00
Adam Simpkins
d5440b15c4 sha1: move the sha1collisiondetection code to third-party
Summary:
Move the third-party sha1collisiondetection code from clib/sha1 to
third-party/sha1dc.  This helps isolate third-party code from our own
internally developed code.

This also updates the code to use the same include paths and library names as
used by the sha1collisiondetection's upstream Makefile, which would be needed
to link against a version of sha1collisiondetection installed locally.

Test Plan:
Confirmed "make local" succeeds.

All of the tests pass, except for test-check-commit-hg, which complains about
the fact that some of this third-party code contains multiple empty lines in a
row.  It doesn't seem straightforward to update test-check-commit to ignore
this third-party code, but these test failures shouldn't affect any future
commits.

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D281
2017-08-22 19:09:07 -07:00
Adam Simpkins
52a9548160 build: check in a clang-format file
Summary:
Check in the .clang-format file used for most of Facebook's other C++ projects.
This will allow clang-format to be used in the fb-hgext repository and produce
consistently formatted code with our other C++ code bases.

Test Plan:
Confirmed clang-format behaved as expected when auto-formatting sections of
files.

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D280
2017-08-22 19:09:07 -07:00
Sonia Kim
7ef1e18d89 lfs: include filename in object lookup fail message
Summary: Object lookup fails in blobstore provided vague error message when a specific file was not present. Updating error message to reference the filename associated with the blob not found.

Test Plan:
In facebook-hg-rpms/fb-hgext/tests directory:  rt test-lfs-test-server.t
Shows no error and validates that correct error message is displayed

Reviewers: quark, rainee, davidsp

Reviewed By: davidsp

Subscribers: medson, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D5617283

Tasks: T18972111

Signature: t1:5617283:1503070630:56fdcab5295ce7d050a24f1a989806066ef7054f
2017-08-22 10:54:41 -07:00
Felix Merk
9df57fe0d2 undo: preview change - just show delta
Change preview to just show the delta and connected commits.  This means we need
to calculate oldworkingcopyparent and bookmarks diffs.  This output will be
cleaner especially for people with a lot of commits in their repo.

Differential Revision: https://phab.mercurial-scm.org/D467
2017-08-22 10:18:03 -07:00
Mark Thomas
7805c8ae35 infinitepush: improve revset for not-backed-up revisions
Summary:
The first version of infinitepush smartlog summary included some false
positives (in particular, not-backed-up but obsolete revs), and took a long
time to compute the set if there were many heads in the repo.

Improve the revset that is used by taking into account the heads that *should*
be backed up.  Ancestors of these heads, that are not ancestors of the actual
backup heads are the ones that should be considered "not backed up".

Test Plan:
Re-run unit tests.
Manual test on devvm.
Perf test against stash's repo which has more heads than mine.

Reviewers: #fbhgext, stash

Differential Revision: https://phab.mercurial-scm.org/D475
2017-08-22 09:03:43 -07:00
Stanislau Hlebik
d90c0a301d infinitepush: always require a pattern for --list-remote
Summary:
--list-remote can return too many nodes if used without a pattern.
Let's require a pattern.

Test Plan: Run unittests

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Subscribers: ryanmce

Differential Revision: https://phab.mercurial-scm.org/D221
2017-08-22 01:24:23 -07:00
Stanislau Hlebik
e3d7418df4 fastlog: use ui.log() instead of ui.warn()
Summary:
ui.warn() just prints to the stderr. It has two disadvantages:
1) Distracts a user
2) Doesn't notify us about the problem.

Let's use ui.log() that will send result to our logging system

Test Plan: Run unit-tests

Reviewers: #fbhgext, quark

Reviewed By: #fbhgext, quark

Differential Revision: https://phab.mercurial-scm.org/D443
2017-08-22 01:23:25 -07:00
Felix Merk
66fc95aa46 interactivui: get rid of flashing
Prevent flashing in 'hg undo -i' for smoother ux.  Tested by running hg undo -i
and not seeing flashes when hitting left or right.

Differential Revision: https://phab.mercurial-scm.org/D465
2017-08-21 15:55:16 -07:00
Jun Wu
805ddc8422 codemod: be compatible with upstream change
D319 renamed `peer.pipe[ioe]` to `peer._pipe[ioe]`.
D320 removed `peer.batch`.
D331 renamed `subprocess` to `_subprocess`.
D336 renamed `_capabilities` to `capabilities`.

Let's be compatible with those changes.

Differential Revision: https://phab.mercurial-scm.org/D425
2017-08-21 15:10:41 -07:00
Felix Merk
fcd302bf7b undo: draft obsolete commits
Visible obsolete commits are slightly tricky.  For example, an amend in the
middle of a stack will leave behind a visible obsoleted commit.  This diff
removes visible obsolete commits from 'olddraft()'.  This removes the need for
some special casing and allows for a more powerful preview.

Differential Revision: https://phab.mercurial-scm.org/D463
2017-08-21 13:28:50 -07:00
Felix Merk
cfbbbdf2c6 undo: preview perf improvements
Based on Adam Simpkin's ideas, faster code for the template functions.

Differential Revision: https://phab.mercurial-scm.org/D462
2017-08-21 13:28:50 -07:00
Felix Merk
e45f912211 undo: preview shows command and time output
Makes hg undo -i and hg undo -p output show an "undo to time, before command"
message and adds directions (left, right, return, q).  Also adds pager check as
pager break interactiveui.

Testing: run hg undo -p and hg undo -i and see output

Differential Revision: https://phab.mercurial-scm.org/D448
2017-08-21 11:25:36 -07:00
Mihails Smolins
c4e13682c5 remotefilelog: efficient keepset computation
Summary:
New keepset computation algorithm yields 50% time improvement on a small set of
commits and about 90% time improvement on a large set of commits. Currently it
takes about 1m10s to compute a keepset of 10 commits with treemanifest
usecunionstore flag unset and 3 seconds with cunionstore config set, provided
all trees are prefetched.

Test Plan: * Ensure that unit tests pass, in particular *-gc.t and *-gcrepack.t

Reviewers: ryanmce, simonfar, durham, #fbhgext

Reviewed By: ryanmce, #fbhgext

Differential Revision: https://phab.mercurial-scm.org/D442
2017-08-21 09:08:19 -07:00
Felix Merk
721459469f undo: draft obsolete handling
Obsoleted commits may be visible.  To make sure that they are un-obsoleted after
undo when appropriate, we add "draft() & obsolete()" recording.  The most common
case where this matters is undoing a mid stack amend.

Differential Revision: https://phab.mercurial-scm.org/D438
2017-08-18 11:40:18 -07:00
Felix Merk
2d555e35dd undo: informative output
Instead of the _showstats output from hg.py, we now output the args and time of
the mercurial command we are undoing.

Differential Revision: https://phab.mercurial-scm.org/D412
2017-08-18 11:37:45 -07:00
Felix Merk
aa2547d949 undo: unfinished command handling
hg rebase, histedit, unshelve and other commands may stop in an unfinished state
because of merge conflicts or other reasons.  The user then has the ability to
continue or abort.  Undoing in this case is slightly tricky as for example
aborting a rebase will perform real strips and so undo will fail with an error.
This change still records these states, but flags them as unfinished and skips
over them when undoing and redoing.  Hg undo --absolute does not ignore these
states in the really unlikely situation you want to go to one of them.

Differential Revision: https://phab.mercurial-scm.org/D410
2017-08-18 11:37:45 -07:00
Ryan McElroy
efdd3372ea dirsync: update tests for upstream behavior change
Summary:
Since f33f2b5b487453a0387c80a2d736ec450696cefe, a failed `hg commit -A` will no
longer update the dirstate.

Reviewers: #fbhgext, simonfar

Reviewed By: #fbhgext, simonfar

Differential Revision: https://phab.mercurial-scm.org/D433
2017-08-18 03:11:29 -07:00
Ryan McElroy
674d828aad undo: allprecursors -> allpredecessors
Summary: Per upstream name changes. Eliminated develwarns.

Reviewers: #fbhgext, simonfar

Reviewed By: #fbhgext, simonfar

Differential Revision: https://phab.mercurial-scm.org/D432
2017-08-18 03:11:29 -07:00
Ryan McElroy
28eed8e961 phabstatus: allprecursors -> allpredecessors
Summary: Renamed upstream. Eliminate more develwarns.

Reviewers: #fbhgext, simonfar

Reviewed By: #fbhgext, simonfar

Subscribers: simonfar

Differential Revision: https://phab.mercurial-scm.org/D431
2017-08-18 03:11:29 -07:00
Ryan McElroy
42c167e16e fbamend: allprecursors -> allpredecessors
Summary: Renamed upstream. Prevent develwarns.

Reviewers: #fbhgext, simonfar

Reviewed By: #fbhgext, simonfar

Differential Revision: https://phab.mercurial-scm.org/D430
2017-08-18 03:11:29 -07:00
Ryan McElroy
6ce9175cd1 fbamend: precursor -> predecessor
Summary: Get in line with upstream name change and eliminate develwarns.

Reviewers: #fbhgext, simonfar, simpkins

Reviewed By: #fbhgext, simonfar, simpkins

Subscribers: quark, simpkins, simonfar

Differential Revision: https://phab.mercurial-scm.org/D429
2017-08-18 03:11:29 -07:00
Ryan McElroy
e2dfc69dc2 fbamend: precnode -> prednode
Summary:
Upstream is changing names to be more consistent. Follow suit to eliminate
devel-warnings.

Reviewers: #fbhgext, simonfar

Reviewed By: #fbhgext, simonfar

Subscribers: simonfar

Differential Revision: https://phab.mercurial-scm.org/D428
2017-08-18 03:11:29 -07:00
Ryan McElroy
7770cdf605 undo: precnode -> prednode
Summary: Names be a'changin.

Reviewers: #fbhgext, simonfar

Reviewed By: #fbhgext, simonfar

Differential Revision: https://phab.mercurial-scm.org/D427
2017-08-18 03:11:29 -07:00
Felix Merk
3f41f783a1 undo: performance improvement attempt
Undo -p is really slow on certain large repos.  This caches 'olddraft()' by
using the revlog nodes.  Since revlogs are immutable this should be really safe
and could hopefully dramatically improve not only hg undo -p performance, but
performance of all undo commands.

Differential Revision: https://phab.mercurial-scm.org/D439
2017-08-17 16:45:37 -07:00
Jun Wu
832ec05e60 pager: migrate to modern pager API
The modern pager API is to use `ui.pager()` explicitly just before the time
a command needs a pager. It's now hard-coded in individual commands, and
opt-in by default. Users wanting to disable pagers for certain commands need
to disable them explicitly. Ideally we don't need the pager extensions or
the `pager.attend` setting.

This patch migrates `show`, `smartlog`, `fastannotate`, and `grep` to use
the modern API.

Differential Revision: https://phab.mercurial-scm.org/D437
2017-08-17 13:42:18 -07:00
Mateusz Kwapich
432714c0bf perftweaks: don't crash if the rebase dest is None
Summary: This happens in case of "pull --rebase" if the source is ancestor of destination

Test Plan: see the new test, it's making hg crash without this change

Reviewers: #fbhgext, ryanmce, simonfar

Reviewed By: #fbhgext, ryanmce, simonfar

Subscribers: ryanmce

Differential Revision: https://phab.mercurial-scm.org/D436
2017-08-17 12:15:02 -07:00
Jun Wu
6e9f7aeb68 absorb: preserve phase
When rewriting changesets, preserve their phases.

Fixes https://bitbucket.org/facebook/hg-experimental/issues/10/hg-absorb-doesnt-preserve-commits-phase

Differential Revision: https://phab.mercurial-scm.org/D418
2017-08-16 13:40:00 -07:00
Mihails Smolins
a2bdf68679 remotefilelog: limit number of changesets to be prefetched
Summary:
Added config option 'prefetchdays' which indicates that commits older than
'prefetchdays' days should not be prefetched. This option is necessary to avoid
prefetch of huge amount of data. The default value is set to 14 days.

Test Plan: Ensure that unit tests pass

Reviewers: ryanmce, simonfar, durham, #fbhgext, simpkins

Reviewed By: #fbhgext, simpkins

Subscribers: simpkins

Differential Revision: https://phab.mercurial-scm.org/D420
2017-08-16 13:21:31 -07:00
Mihails Smolins
a46c678ab9 remotefilelog: flaky bgprefetch test fix
Summary:
The test fails due to a race condition. Now the failing part of the test
output is optional.

Test Plan: Ensure that unit tests do not fail

Reviewers: ryanmce, simonfar, #fbhgext

Reviewed By: ryanmce, #fbhgext

Differential Revision: https://phab.mercurial-scm.org/D417
2017-08-16 09:16:07 -07:00
Ryan McElroy
73ea227f7d treemanifest: make tests more lenient and fail more descriptively
Summary:
The test-treemanifest-pushrebase test was failing in our continuous integration
environment with a perplexing error:

```
$ pushclients
+ abort: exporting bookmark master failed!
```

(plus some additional failures later)

I thought this should not be possible because of the redirect, but it turns out
that the order of the redirects matters:

`>/dev/null 2>&1` redirects both stderr and stdout to `/dev/null`, but
`2>&1 >/dev/null` redirects stdout to /dev/null and stderr to stdout

(TIL)

However, this was the only clue to the issue that was going on, and so it's
better to actually keep the error around, if one occurs, so I removed the 2>&1
redirect altogether.

Furthermore, the test was failing with various clients failing to push.
To increase the chance of this succeeding, I'm bumping the sleep time. Ideally,
we should wait for the server to be "ready", but I'm not certain what that means
or how to test and would like to discuss to figure it out. This hopefully will
unblock the continuous integration for now.

Test Plan: Test still passes locally; wait to see if it passes in automation.

Reviewers: #fbhgext, mitrandir

Reviewed By: #fbhgext, mitrandir

Differential Revision: https://phab.mercurial-scm.org/D415
2017-08-16 16:12:04 +01:00
Jun Wu
50e07b913e test: do not ignore test-check sanity check
Previously, if the system hg does not work, `helper-testrepo.sh` will skip
the test (usually `test-check-*.t`). This patch makes it stricter so a
non-functional system hg will be an error so it's less likely to be ignored.

Differential Revision: https://phab.mercurial-scm.org/D387
2017-08-15 16:56:54 -07:00
Felix Merk
00870d6060 undo: don't break when undo isn't first argument
Undo commands where undo wasn't first, for example `hg --pager=off undo` break
multiple things, including hg redo.  This change fixes this.

Differential Revision: https://phab.mercurial-scm.org/D396
2017-08-15 16:56:25 -07:00
Felix Merk
8a98220afc undo: invalidate false cache
Mercurial sometimes leaves bad caches.  Easiest example is when updating to a
hidden commit, where hg undo will fail, but can be reproduced with many commands
(such as fold which is used for testing here).

Test Plan:
unit tests

Differential Revision: https://phab.mercurial-scm.org/D395
2017-08-15 16:56:25 -07:00
Felix Merk
1ab935a4dc undo: add Scuba logging
Adds scuba logging to dev command timers so we can see how often some seemingly
unlikely edge (error) cases happen.  Once we are confident that hg undo is
stable we can get rid of these logs.  This is specifically for things that
don't loudly fail (since the user shouldn't care about them) but we still would
like to know about.  Note that
[sampling]
key.undo=perfpipe_dev_command_timers
is needed in an hgrc file for this to work.

Test: deleted gap file, ran undo and confirmed error was noted in dev command
timers

Differential Revision: https://phab.mercurial-scm.org/D357
2017-08-15 16:50:40 -07:00
Adam Simpkins
f2f8ba9c30 remotefilelog: open pack files with O_CLOEXEC
Summary:
If os.name is "posix", add the "e" flag when opening pack files.  On systems
using glibc 2.7+ this causes the underlying operating system open() call to use
the O_CLOEXEC flag.  This ensures that the pack file descriptors will not be
inherited by any children processes.  This can be helpful since the
remotefilelog code can sometimes have thousands of pack files open.  This
causes problems for children processes that expect to be able to use select()
on file descriptors they create, since they can end up with file descriptor
numbers over 1024.

While making sure to always set close_fds=True when calling subprocess.Popen()
can help with this, using O_CLOEXEC to fix the problem from the start seems
like a nicer fix.

The extra "e" flag generally should be ignored by other C library
implementations that do not support this flag.  I explicitly scoped this to the
"posix" OS just to ensure that this cannot collide with other OS-specific flags
on other operating systems.  (Windows also defines several of its own custom
fopen() flags.  Windows does not currently use "e", but it seems best to avoid
it anyway.)

Test Plan:
Ran hg under strace and confirmed that the pack files were opened with
O_CLOEXEC.

Reviewers: quark, durham, #fbhgext

Reviewed By: quark, #fbhgext

Differential Revision: https://phab.mercurial-scm.org/D398
2017-08-15 10:49:20 -07:00
Simon Farnsworth
0d8b65f603 tweakdefaults: do not change the date when using amend --to
Summary:
amend --to is a thin wrapper around histedit, and fails if you ask it
to update the date. tweakdefaults can be configured to ask amend to change the
date. When this is the case, don't change the date when using --to, so that it
can work.

Test Plan:
Test case added here fails before the change complaining about other
flags with --to, and fails in the histedit afterwards (I'm not clear on why - I
suspect phases are significant here).

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D349
2017-08-15 07:21:37 -07:00