Jun Wu <quark@fb.com> [Tue, 29 Aug 2017 17:49:13 -0700] rev 34007
rebase: remove an unnecessary adjustdest in clearrebased
`rev` being "skipped" could currently be caused by moving `rev` does not
create a new commit. In this case, `state[rev]` is already changed to `p1`,
and is a sane destination for bookmark or working parent movement. Therefore
an additional destination adjustment is unnecessary.
Differential Revision: https://phab.mercurial-scm.org/D565
Jun Wu <quark@fb.com> [Mon, 21 Aug 2017 20:22:07 -0700] rev 34006
rebase: sort destmap topologically
Previously rebase source and destination could not overlap. But with the
multi-destination support, source and destination could reasonably partially
overlap. That requires another topological sort on `{sourcerev: destrev}`
graph (destmap). This patch implements that.
If a revision's destination is itself, the error message gets changed from
"source is ancestor of destination" to "source and destination form a
cycle". Not marking as BC since automation should depend on exit code, not
error message.
Differential Revision: https://phab.mercurial-scm.org/D470
Jun Wu <quark@fb.com> [Tue, 29 Aug 2017 17:27:37 -0700] rev 34005
rebase: initial support for multiple destinations
This patch defines `SRC` (a single source revision) and `ALLSRC` (all source
revisions) to be valid names in `--dest` revset if `--src` or `--rev` is
used. So destination could be defined differently according to source
revisions. The names are capitalized to make it clear they are "dynamically
defined", distinguishable from normal revsets (Thanks Augie for the
suggestion).
This is useful, for example, `-r 'orphan()' -d 'calc-dest(SRC)'` to solve
instability, which seems to be a highly wanted feature.
The feature is not completed, namely if `-d` overlaps with `-r`, things
could go wrong. A later patch will handle that case.
The feature is also gated by `experimental.rebase.multidest` config option
which is default off.
Differential Revision: https://phab.mercurial-scm.org/D469
Jun Wu <quark@fb.com> [Fri, 11 Aug 2017 00:32:19 -0700] rev 34004
rebase: change internal format to support destination map
A later patch will add multiple destination support. This patch changes
internal state and the rebase state file format to support that. But the
external interface still only supports single destination.
A test was added to make sure rebase still supports legacy state file.
The new state file is incompatible with old clients. We had done similar
state file format change before: 5eac7ab, 92409f8, and 72412af. The state
file is transient, so the impact of incompatibility is limited. Besides,
the old client won't support multiple destinations anyway so it does not
really make sense to make the file format compatible with them.
Differential Revision: https://phab.mercurial-scm.org/D348
Jun Wu <quark@fb.com> [Fri, 11 Aug 2017 00:31:52 -0700] rev 34003
rebase: rewrite _computeobsoletenotrebased
The old code stores successors of all related nodes together, which works
fine if destination is unique. A future patch would make destination
non-unique so let's change the implementation to test successors for
rebaseset separately.
Differential Revision: https://phab.mercurial-scm.org/D347
Michael Bolin <mbolin@fb.com> [Tue, 22 Aug 2017 00:38:38 +0000] rev 34002
util: use ~ as a suffix for a temp file in the same directory as a source file
Tools like Buck have patterns to ignore the creation of files (in the working
copy) that match certain patterns:
https://github.com/facebook/buck/blob/
39278a4f0701c5239eae148968dc1ed4cc8661f7/src/com/facebook/buck/cli/Main.java#L259-L299
When Buck sees a new source file (as reported by Watchman), it has to invalidate
a number of caches associated with the directory that contains the file.
Using a standard suffix, such as `~`, would make it easier for Buck and others
to filter out these types of file creation events.
The other uses of `tempfile.mkstemp()` in Hg do not appear to be problematic
because they (generally speaking) do not specify the `dir` parameter, so the
new file is created in the system-appropriate temp directory, which is outside
the working copy.
Test Plan:
`make tests`
Differential Revision: https://phab.mercurial-scm.org/D468
Martin von Zweigbergk <martinvonz@google.com> [Mon, 28 Aug 2017 14:47:18 -0700] rev 34001
morestatus: simplify check for unresolved merge conflicts
Differential Revision: https://phab.mercurial-scm.org/D546
Martin von Zweigbergk <martinvonz@google.com> [Mon, 28 Aug 2017 15:06:34 -0700] rev 34000
tests: rename test-terse-status.t to test-status-terse.t
When looking for status tests, most people would probably look for
"test-status*", so it would be nice if they could find it there. This
also let's them run (most) status tests with "run-tests.py
test-status*".
Differential Revision: https://phab.mercurial-scm.org/D547
Jun Wu <quark@fb.com> [Mon, 28 Aug 2017 16:58:59 -0700] rev 33999
metadataonlyctx: don't crash when reusing the manifest with deletions
This was originally fixed by Mateusz Kwapich for the `metaedit` command in
fb-hgext with a test for the `metaedit` command. It didn't get upstreamed
because `metaedit` was not in core.
This patch fixes the crash and adds a test about `metadataonlyctx` to
avoid future regressions.
Differential Revision: https://phab.mercurial-scm.org/D550
Jun Wu <quark@fb.com> [Mon, 28 Aug 2017 16:49:41 -0700] rev 33998
context: make parents and text optional in metadataonlyctx
The metadataonlyctx is to copy an existing context with some minor metadata
changes. If the caller only wants to change "extra", or "user", ideally it
does not have to read and pass "parents" and "text" information.
This patch makes "parents" and "text" optionally to convenient callers.
Differential Revision: https://phab.mercurial-scm.org/D548
Boris Feld <boris.feld@octobus.net> [Thu, 17 Aug 2017 18:09:32 +0200] rev 33997
test: add more obsmarker tests for pruning scenarios
The obsfate output in cases of pruning is not ideal right now, add some tests
so have these scenarios around.
Boris Feld <boris.feld@octobus.net> [Mon, 03 Jul 2017 17:38:56 +0200] rev 33996
template: better prune support in obsfate
successorssets don't returns good results for pruned commit, add a workaround
for simple cases.
A proper fix would require a large rework of successorssets algorithm, I will
send a separate series for this refactoring.
Boris Feld <boris.feld@octobus.net> [Mon, 03 Jul 2017 15:34:10 +0200] rev 33995
template: compute dates in obsfatedate
Extract the dates from obsmarkers. Compute the min and max date from the
obsmarker range list.
Boris Feld <boris.feld@octobus.net> [Mon, 03 Jul 2017 15:34:00 +0200] rev 33994
template: compute user in obsfateusers
Extract, deduplicate users informations from obs markers in order to display
them.
Print all users for the moment, we might want to display users only in verbose
mode later.
Boris Feld <boris.feld@octobus.net> [Mon, 03 Jul 2017 15:33:27 +0200] rev 33993
template: compute verb in obsfateverb
Add a template function obsfateverb which use the markers information to
compute a better obsfate verb.
The current logic behind the obsfate verb is simple for the moment:
- If the successorsets is empty, the changeset has been pruned, for example:
Obsfate: pruned
- If the successorsets length is 1, the changeset has been rewritten without
divergence, for example:
Obsfate: rewritten as 2:
337fec4d2edc, 3:
f257fde29c7a
- If the successorsets length is more than 1, the changeset has diverged, for
example:
Obsfate: split as 2:
337fec4d2edc, 3:
f257fde29c7a
As the divergence might occurs on a subset of successors, we might see some
successors twice:
Obsfate: split as 9:
0b997eb7ceee, 5:
dd800401bd8c, 10:
eceed8f98ffc; split
as 8:
b18bc8331526, 5:
dd800401bd8c, 10:
eceed8f98ffc
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 17:16:13 -0400] rev 33992
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.
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 17:15:20 -0400] rev 33991
tests: update test-obsolete to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 17:15:14 -0400] rev 33990
tests: update test-largefiles-cache to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 17:15:09 -0400] rev 33989
tests: update test-inherit-mode to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 17:11:30 -0400] rev 33988
tests: update test-relink to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:59:26 -0400] rev 33987
tests: update test-strip to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:59:21 -0400] rev 33986
tests: update test-share to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:59:17 -0400] rev 33985
tests: update test-requires to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:59:12 -0400] rev 33984
tests: update test-progress to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:59:06 -0400] rev 33983
tests: update test-patchbomb to pass our import checker
Augie Fackler <augie@google.com> [Mon, 28 Aug 2017 17:40:03 -0400] rev 33982
merge with stable
Michael Bolin <mbolin@fb.com> [Wed, 23 Aug 2017 18:24:57 +0000] rev 33981
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
Jun Wu <quark@fb.com> [Thu, 24 Aug 2017 20:25:16 -0700] rev 33980
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
Martin von Zweigbergk <martinvonz@google.com> [Fri, 25 Aug 2017 22:05:10 -0700] rev 33979
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
Jun Wu <quark@fb.com> [Thu, 24 Aug 2017 17:44:08 -0700] rev 33978
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
Jun Wu <quark@fb.com> [Thu, 24 Aug 2017 17:31:33 -0700] rev 33977
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
Jun Wu <quark@fb.com> [Thu, 24 Aug 2017 17:25:18 -0700] rev 33976
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
Jun Wu <quark@fb.com> [Thu, 24 Aug 2017 16:52:28 -0700] rev 33975
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
Jun Wu <quark@fb.com> [Thu, 24 Aug 2017 17:26:10 -0700] rev 33974
phabsend: polish the docstring a bit
Differential Revision: https://phab.mercurial-scm.org/D510
Peter Vitt <peter.vitt2@uni-siegen.de> [Mon, 28 Aug 2017 13:43:31 +0200] rev 33973
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.
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:59:02 -0400] rev 33972
tests: update test-patch to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:58:57 -0400] rev 33971
tests: update test-pager to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:58:52 -0400] rev 33970
tests: update test-obsolete to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:58:47 -0400] rev 33969
tests: update test-notify to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:58:43 -0400] rev 33968
tests: update test-merge1 to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:58:37 -0400] rev 33967
tests: update test-merge-symlinks to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:58:28 -0400] rev 33966
tests: update test-logtoprocess to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:58:22 -0400] rev 33965
tests: update test-log to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:58:13 -0400] rev 33964
tests: update test-log-exthook to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:58:07 -0400] rev 33963
tests: update test-largefiles-wireproto to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 16:57:37 -0400] rev 33962
tests: update test-largefiles-small-disk to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:51:47 -0400] rev 33961
tests: update test-keyword to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:51:37 -0400] rev 33960
tests: update test-impexp-branch to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:51:30 -0400] rev 33959
tests: update test-help to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:51:24 -0400] rev 33958
tests: update test-hardlinks to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:51:18 -0400] rev 33957
tests: update test-glog to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:51:12 -0400] rev 33956
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:51:06 -0400] rev 33955
tests: update test-eol to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:50:59 -0400] rev 33954
tests: update test-dirstate to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:50:35 -0400] rev 33953
tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:50:27 -0400] rev 33952
tests: update test-convert-clonebranches to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:50:01 -0400] rev 33951
tests: update test-commit to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:49:54 -0400] rev 33950
tests: update test-command-template to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:49:20 -0400] rev 33949
tests: update test-chg to pass our import checker
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 15:05:51 -0400] rev 33948
tests: update test-bundle2-format to pass import checker