This solves check-code issues:
fastmanifest/concurrency.py:144:
> if platform.system() == 'Windows':
don't use platform.system(), use pycompat
hgext3rd/extutil.py:15:
> if platform.system() == 'Windows':
don't use platform.system(), use pycompat
remotefilelog/basepack.py:44:
> if pycompat.osname == 'posix':
use pycompat.isposix
Summary:
The config 'histeditng' was removed in upstream recently and is
therefore, no longer required. This commit removes the config and fixes some
tests which were dependent on it.
Test Plan: Ran all the tests.
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D1118
D1050 got lost by landing D1048 via pushrebase, because pushrebase does not
check the source of copied files.
The graph looks like:
o D1048 sparse: rename to fbsparse (after pushrebase)
o D1050 mbthomas sparse: fix for upstreamed path conflicts changes
| x D1048 sparse: rename to fbsparse (before pushrebase)
|/
o
|
~
The goal to show hash changes is to add support for json output printing full
hashes to increase support for automation and Nuclide. To achieve the goal in
best and clean way, we must use formatter. So support of using formatter and
having json output for commands will be added to commands. Since for those
commands we don't need this wrapper, lets add a functionality to skip the
wrapper for some commands.
We need to update the set introduced in this patch for each command we add
support to show hash changes.
Differential Revision: https://phab.mercurial-scm.org/D1038
Summary:
Fix another code path in phrevset that could incorrectly return commit strings
instead of rev numbers.
Test Plan:
Manually tweaked phrevset to force it to hit this code path (to ensure it would
not find the commit from the local log walk first), and confirmed it now
returned a rev ID instead of commit strings.
Reviewers: #fbhgext, quark, durham
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D684
Summary: show extension: 'hg show --stat' should not show patch, just like 'git show --stat'
Test Plan: test-show.t
'hg show --stat' shoes diffstat, not patch
'hg show' shows patch, but no stat
Reviewers: rmcelroy,phillco
Subscribers: ianj
Tags:
Tasks: 22546204
Blame Revision:
Summary:
Renaming this config to `obsshelve.maxbackups` for now eliminates the overlap with the
`shelve.maxbackups` config and fixes the root problem that D995 was trying to solve.
Reviewers: #fbhgext, durham
Reviewed By: #fbhgext, durham
Subscribers: durham
Differential Revision: https://phab.mercurial-scm.org/D1054
This avoids conflict with the core extension (`hgext/sparse.py`). In
development mode, the `hgext` version takes precedence and people can easily
use the wrong sparse extension.
`sparse.py` is kept for compatibility.
Differential Revision: https://phab.mercurial-scm.org/D1048
Upstream recently added path conflicts as a concept. Update the
conflictinfo extension to understand and show path conflicts.
Path conflicts are different to other kinds of conflicts, so appear
in a separate list in the form:
"pathconflicts:" [{
"path": "path/to/directory",
"fileorigin": "local", # or "remote"
"renamedto": "path/to/renamedfile"
}]
Differential Revision: https://phab.mercurial-scm.org/D1051
Add a new `histedit` verb: `graft`. This allows grafting (copying) of
changesets from outside of the history that is being edited, using the
node hash of the other changeset.
The other changeset is left intact - its contents are duplicated in a new
changeset.
The other changeset must not be one of the changesets that are being
edited as part of the histedit.
Differential Revision: https://phab.mercurial-scm.org/D1025
This patch drops the uncommit extensions which has been moved to core. The
in-core extension does not allow bare `hg uncommit` on dirty working directory.
One need to set `experimental.uncommitondirtywdir = True` to do `hg uncommit` on
dirty working directory.
So this patch also set the required config to True in tweakdeafults.py to
maintain the behaviour.
Differential Revision: https://phab.mercurial-scm.org/D751
Summary:
Update the workingfilectxdata() to check that this is actually a sparse
repository before trying to call repo.sparsematch()
Test Plan: Update the test to confirm that "hg diff" works instead of crashes now.
Reviewers: #fbhgext, mbthomas
Reviewed By: #fbhgext, mbthomas
Differential Revision: https://phab.mercurial-scm.org/D1023
Drop was passing a rev number to cleanupnodes, which isn't supported. New
versions of hg throw an exception when this happens, so this was caught by the
tests.
We no longer use this experiment and the upstream refactor breaks it. Let's remove it.
Test Plan:
all sqldirstate tests pass now
Differential Revision: https://phab.mercurial-scm.org/D944
When a file changed to include a flag and then the flag is removed we did not
correctly remove the flag. We now correctly set flags for all revisions.
Differential Revision: https://phab.mercurial-scm.org/D920
This diff adds an option --cwd-list to hg sparse. This will return the
contents of the current directory. The files that are in the sparse profile are
annotated with a '-' indicator.
Test Plan:
Tested by running the command 'hg sparse --cwd-list' in various folders.
Differential Revision: https://phab.mercurial-scm.org/D731
Summary:
I think this is a better way of surfacing this warning. It also allows
us to tweak the message so we can point at new documentation I have already
written up.
Test Plan: Updated test
Reviewers: #fbhgext, mbthomas, durham, singhsrb
Reviewed By: #fbhgext, mbthomas, durham, singhsrb
Subscribers: singhsrb, quark
Differential Revision: https://phab.mercurial-scm.org/D812
Resolving obsoleted revisions (`repo.revs('obsolete()')`) is slow. Let's
move that filtering logic from read code path to write code path. So it does
not get executed for every command.
Test Plan:
`hg bookmark --hidden --profile`. Make sure obsstore loading logic
disappears from the profiling output.
Differential Revision: https://phab.mercurial-scm.org/D806
p4fastimport's reposetup will break other lfs commands or verify. Let's
limit that side effect to p4fastimport related commands. So they won't
affect users with p4fastimport enabled.
Differential Revision: https://phab.mercurial-scm.org/D801
Add a --sparse option to `hg diff` which filters the diff to include only files
that are part of the sparse profile.
When files are moved or copied across the sparse profile boundary, they will
show as added or removed (for moves) in the diff. This is the same behaviour
as `hg diff --root`.
Test Plan:
Expand `tests/test-sparse-diff.t`
Differential Revision: https://phab.mercurial-scm.org/D797
When commands like 'diff' request the contents of files from a workingfilectx,
normally this is satisfied by reading from disk. For files outside the sparse
checkout this doesn't work, so instead we must return the content from the
working copy parent.
Test Plan:
`tests/test-sparse-diff.t`
Differential Revision: https://phab.mercurial-scm.org/D788
We must correctly return the value from the function we are decorating.
Test Plan:
run tests
Differential Revision: https://phab.mercurial-scm.org/D767
Summary:
Adding a config to control (only enable/disable for now) developer
warnings. This allows disabling the warnings on platforms like servers.
Test Plan: Updated and ran test-tweakdefaults.t
Reviewers: #fbhgext, durham
Reviewed By: #fbhgext, durham
Differential Revision: https://phab.mercurial-scm.org/D802
With rules of nested paths, the order of rules matters.
Note: this does not make dirsync handle recursive changes. i.e. a mirror
from path1 to path2 won't trigger a rule matching path2.
Differential Revision: https://phab.mercurial-scm.org/D770
Previously, undolog runs for every command, which sometimes adds unwanted
noticeable overhead like `hg status` with a large obsstore. This patch makes
undo smarter to only log commands that actually write things.
This is done by making undolog only run for transactions, updates (legacy
code that does not require a transaction). Tests are changed to reflect
`hg status` does not trigger undolog, and the new code seems to work better
with chg.
Differential Revision: https://phab.mercurial-scm.org/D739
Summary:
Just as in phabricator/conduit.py. It is necessary for D620
BTW, not sure why do we have very similar code in two places.
Test Plan: Will be tested in D620
Reviewers: #fbhgext, shivramk, mitrandir
Reviewed By: #fbhgext, mitrandir
Differential Revision: https://phab.mercurial-scm.org/D742
Summary:
auto-rebasing stuff during metaedit doesn't really work well for histedit.
Let's specialcase it
Test Plan: see test
Reviewers: #fbhgext, ryanmce
Reviewed By: #fbhgext, ryanmce
Subscribers: ryanmce
Differential Revision: https://phab.mercurial-scm.org/D747
When calling prefetch in remotefilelog, also prefetch lfs
files.
We are using the same hook mechanism that remotefilelog is already using
for LFS by having remotefilelog call into LFS.
Test Plan:
run tests on test-lfs-remotefilelog-prefetch.t
Differential Revision: https://phab.mercurial-scm.org/D732