Commit Graph

33786 Commits

Author SHA1 Message Date
Augie Fackler
169f5af21b contrib: add test-check-module-imports.t to the Python 3 whitelist
This has the benefit of also catching most (if not all!) old-style
print statements and except statements.
2017-08-22 17:16:13 -04:00
Augie Fackler
86f77ea3a7 tests: update test-obsolete to pass our import checker 2017-08-22 17:15:20 -04:00
Augie Fackler
07f2388ec1 tests: update test-largefiles-cache to pass our import checker 2017-08-22 17:15:14 -04:00
Augie Fackler
7c12659d0a tests: update test-inherit-mode to pass our import checker 2017-08-22 17:15:09 -04:00
Augie Fackler
af6f453ff6 tests: update test-relink to pass our import checker 2017-08-22 17:11:30 -04:00
Augie Fackler
b5e3304e45 tests: update test-strip to pass our import checker 2017-08-22 16:59:26 -04:00
Augie Fackler
e5c9fa4092 tests: update test-share to pass our import checker 2017-08-22 16:59:21 -04:00
Augie Fackler
58c23bd117 tests: update test-requires to pass our import checker 2017-08-22 16:59:17 -04:00
Augie Fackler
da58a4fdbf tests: update test-progress to pass our import checker 2017-08-22 16:59:12 -04:00
Augie Fackler
41137de614 tests: update test-patchbomb to pass our import checker 2017-08-22 16:59:06 -04:00
Augie Fackler
16ad9b6bae merge with stable 2017-08-28 17:40:03 -04:00
Jun Wu
45a4782018 record: fix revert -i for lines without newline (issue5651)
This is a regression caused by 10c1efcbeb1e. Code prior to 10c1efcbeb1e
seems to miss the "\ No newline at end of file" line.

Differential Revision: https://phab.mercurial-scm.org/D528
2017-08-27 13:39:17 -07:00
Michael Bolin
3b574ea901 dirstate: perform transactions with _copymap using single call, where possible
This replaces patterns such as this:

```
if f in self._copymap:
    del self._copymap[f]
```

with this:

```
self._copymap.pop(f, None)
```

Although eliminating the extra lookup/call may be a negligible performance win
in the standard dirstate, alternative implementations, such as
[sqldirstate](https://bitbucket.org/facebook/hg-experimental/src/default/sqldirstate/)
may see a bigger win where each of these calls results in an RPC,
so the savings is greater.

Test Plan:
`make tests`

Differential Revision: https://phab.mercurial-scm.org/D493
2017-08-23 18:24:57 +00:00
Jun Wu
f873da355e pull: do not prompt "hg update" if update.requiredest is set
Previously, after pull, we show:

  (run 'hg update' to get a working copy)

unconditionally. People might run `hg update` and get an exception if
`update.requiredest` is set, and get a bit frustrated. This patch changes
the code to not prompt `hg update` in that case.

Differential Revision: https://phab.mercurial-scm.org/D516
2017-08-24 20:25:16 -07:00
Martin von Zweigbergk
75ce730bf8 changelog: abort on attempt to write wdir revision
Similar to the previous patch which prevented writing the null
revision to any revlog, but this is for the wdir revision.

Thanks to Jun for pointing this out.

Differential Revision: https://phab.mercurial-scm.org/D524
2017-08-25 22:05:10 -07:00
Jun Wu
e80bc134f5 phabsend: show associated Differential Revisions with --confirm
Often people running `phabsend --confirm` just want to check whether a
commit will trigger a creation of new Differential Revision, or update an
existing one. This patch implements that. The `--confirm` message was
changed to use node instead of revision number to be consistent with what
`phabsend` outputs.

An example output looks like:

  D487 - a80f447973a0 test-extension: enable demandimport explicitly
  D494 - cf440ea6e47e test-casecollision-merge: fix the test
  NEW - 0a6b97147128 phabsend: polish the docstring a bit
  Send the above changes to https://phab.mercurial-scm.org/ (yn)?

Differential Revision: https://phab.mercurial-scm.org/D514
2017-08-24 17:44:08 -07:00
Jun Wu
6ce8fb7684 phabsend: print the actual URL with --confirm
Sometimes people have multiple Phabricator endpoints set in multiple repos.
It seems better for `--confirm` to prompt about the Phabricator endpoint
patches being sent to.

Differential Revision: https://phab.mercurial-scm.org/D513
2017-08-24 17:31:33 -07:00
Jun Wu
edfba89554 phabsend: detect patch change with larger context
Previously phabsend has an optimization that will skip uploading a diff if
the patch (with context line number = 1) remains unchanged. That could be
confusing:

  Aug 24 15:52:28 <martinvonz> phillco: something is wrong with phabricator'your patches/
  Aug 24 15:52:45 <martinvonz> ... with phabricator's view of your patches again
  Aug 24 15:53:38 <martinvonz> if i phabread D388 and then D399, i get a version of filemerge.py with "a, b, c" somewhere on line 344, which is not what phabricator shows for D399
  Aug 24 15:53:51 <martinvonz> junw: maybe that's more for you ^

Fix that by checking context with 32767 lines, which is the same as what
will be actually sent.

Differential Revision: https://phab.mercurial-scm.org/D512
2017-08-24 17:25:18 -07:00
Jun Wu
3969533711 phabsend: make --amend the default
The local tag feature was intended to make `phabsend` closer to `email`
workflow. But its experience is not great in multiple ways:

  - after rebase, obsoleted changesets are still visible because of tags
  - without obsstore, the association information will get lost
  - even with obsstore, things could go wrong with graft, export+import
  - no easy way to tell which Differential Revision a commit is associated

Therefore make `--amend` the default. People wanting the old behavior can
use `--no-amend`.

Differential Revision: https://phab.mercurial-scm.org/D511
2017-08-24 16:52:28 -07:00
Jun Wu
e2464e037c phabsend: polish the docstring a bit
Differential Revision: https://phab.mercurial-scm.org/D510
2017-08-24 17:26:10 -07:00
Peter Vitt
0725932203 record: make the m key open an editor for the commit message (issue5667)
With the former crecord extension, the user could edit the commit
message while he was de-/selecting hunks. By pressing 'm', an editor
showed up to edit the commit message.

With record being part of mercurial, this feature is not available
anymore. However, the help text still mentions it.

As the infrastructure needed is still present, this feature is quite
easily ported from the crecord extension to mercurial.

It seems there is no test coverage for record ui, so I tested this patch
manually on my local machine.
2017-08-28 13:43:31 +02:00
Augie Fackler
6a2406886b tests: update test-patch to pass our import checker 2017-08-22 16:59:02 -04:00
Augie Fackler
399e672e56 tests: update test-pager to pass our import checker 2017-08-22 16:58:57 -04:00
Augie Fackler
be5dcdb02a tests: update test-obsolete to pass our import checker 2017-08-22 16:58:52 -04:00
Augie Fackler
6cd5685c09 tests: update test-notify to pass our import checker 2017-08-22 16:58:47 -04:00
Augie Fackler
499e35d188 tests: update test-merge1 to pass our import checker 2017-08-22 16:58:43 -04:00
Augie Fackler
1b6ae5b5ea tests: update test-merge-symlinks to pass our import checker 2017-08-22 16:58:37 -04:00
Augie Fackler
c9814ada51 tests: update test-logtoprocess to pass our import checker 2017-08-22 16:58:28 -04:00
Augie Fackler
80fbfddb47 tests: update test-log to pass our import checker 2017-08-22 16:58:22 -04:00
Augie Fackler
e97a9bbde9 tests: update test-log-exthook to pass our import checker 2017-08-22 16:58:13 -04:00
Augie Fackler
6f701f209e tests: update test-largefiles-wireproto to pass our import checker 2017-08-22 16:58:07 -04:00
Augie Fackler
312f8ae32a tests: update test-largefiles-small-disk to pass our import checker 2017-08-22 16:57:37 -04:00
Augie Fackler
29f3197620 tests: update test-keyword to pass our import checker 2017-08-22 15:51:47 -04:00
Augie Fackler
b41cbf2e36 tests: update test-impexp-branch to pass our import checker 2017-08-22 15:51:37 -04:00
Augie Fackler
fdb9502c56 tests: update test-help to pass our import checker 2017-08-22 15:51:30 -04:00
Augie Fackler
bee02ba8da tests: update test-hardlinks to pass our import checker 2017-08-22 15:51:24 -04:00
Augie Fackler
6fec0d4521 tests: update test-glog to pass our import checker 2017-08-22 15:51:18 -04:00
Augie Fackler
1aebac4281 tests: update test-fncache to pass our import checker 2017-08-22 15:51:12 -04:00
Augie Fackler
71f181153f tests: update test-eol to pass our import checker 2017-08-22 15:51:06 -04:00
Augie Fackler
84bc4fa4db tests: update test-dirstate to pass our import checker 2017-08-22 15:50:59 -04:00
Augie Fackler
9767738e92 tests: update test-debugcommands to pass our import checker 2017-08-22 15:50:35 -04:00
Augie Fackler
e85cf68cd1 tests: update test-convert-clonebranches to pass our import checker 2017-08-22 15:50:27 -04:00
Augie Fackler
07679f3f36 tests: update test-commit to pass our import checker 2017-08-22 15:50:01 -04:00
Augie Fackler
3bf0b90e12 tests: update test-command-template to pass our import checker 2017-08-22 15:49:54 -04:00
Augie Fackler
bfd5f74f29 tests: update test-chg to pass our import checker 2017-08-22 15:49:20 -04:00
Augie Fackler
3260906bb2 tests: update test-bundle2-format to pass import checker 2017-08-22 15:05:51 -04:00
Augie Fackler
ee537483fc tests: update test-bundle2-pushback to pass the import checker 2017-08-22 15:04:36 -04:00
Augie Fackler
f8d9a41b22 tests: update test-bookmarks to pass the import checker 2017-08-22 15:04:14 -04:00
Augie Fackler
fca8e3aefa tests: update test-bisect to pass our module import checker 2017-08-22 14:58:39 -04:00
Augie Fackler
070f42ffe6 tests: update test-archive to pass our module import checker 2017-08-22 14:58:21 -04:00