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
Summary: "hg hide" is the user friendly command for hiding commits
Test Plan: ran tests
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D725
Summary:
Reorganising the imports in the file gitlookup.py to comply with the
recommended way.
Test Plan: Ran all the tests.
Reviewers: #fbhgext, durham
Reviewed By: #fbhgext, durham
Subscribers: durham
Differential Revision: https://phab.mercurial-scm.org/D702
Summary:
I was reorganising the imports of gitlookup.py. After reorganising, the test
test-check-code-hg.t was probably able to recognise the imports and suggested
that we should using util.urlreq instead of urllib. Therefore, I am making the
suggested change in this commit and removing the urllib dependency.
I will be reorganising the imports in a later commit.
Test Plan: Ran all the tests.
Reviewers: #fbhgext, durham
Reviewed By: #fbhgext, durham
Subscribers: durham
Differential Revision: https://phab.mercurial-scm.org/D701
Summary:
The gitlookup extension allows for only requesting the complete file
from the server. This leads to download of large files (hg-git map file
specifically in this case) when only the missing chucks of the file would have
sufficed.
This commit makes changes to allow for downloading only the missing parts of
the map file. A config option 'onlymapdelta' has also been added to allow for
switching between the two different modes of operation: serving complete file
and serving only the missing chunks. The tests were subsequently updated to
cater to the new scenario and also, checking for interoperability of the two
modes.
Test Plan: Ran all the tests.
Reviewers: #fbhgext, durham
Reviewed By: #fbhgext, durham
Subscribers: durham
Differential Revision: https://phab.mercurial-scm.org/D695
Summary:
There is no description of the 'gitlookup' extension when 'hg help
gitlookup' in invoked. I just changed the existing code comments to form a
description.
Test Plan: Checked output of 'hg help gitlookup'
Reviewers: #fbhgext, durham
Reviewed By: #fbhgext, durham
Differential Revision: https://phab.mercurial-scm.org/D693
Summary:
This commit just refactors some code to setup nicely for handling a
new type of bundle part. The refactoring essentially moves out the parts that
can be reused later.
Test Plan: Ran all the tests.
Reviewers: #fbhgext, durham
Reviewed By: #fbhgext, durham
Differential Revision: https://phab.mercurial-scm.org/D692