When checking the bundle contents against the revisions it is being rebased
over, include the sources of renames, as changes made in those files also
conflict with the bundle.
Differential Revision: https://phab.mercurial-scm.org/D1199
In the old version of this extension it was too difficult to determine how to
resume or abort the command that generated conflicts. Let's add that
information so consumers can programatically continue or abort.
Differential Revision: https://phab.mercurial-scm.org/D713
Summary:
Stupid bug corrupted files with extra \r on windows.
From python manual:
>On Windows, 'b' appended to the mode opens the file in binary mode, so there are also modes like 'rb', 'wb', and 'r+b'. Python on Windows makes a distinction between text and binary files; the end-of-line characters in text files are automatically altered slightly when data is read or written. This behind-the-scenes modification to file data is fine for ASCII text files, but it’ll corrupt binary data like that in JPEG or EXE files. Be very careful to use binary mode when reading and writing such files. On Unix, it doesn’t hurt to append a 'b' to the mode, so you can use it platform-independently for all binary files.
Test Plan: the crdump tests should now pass on windows as well (didn't actually run them on Windows because I don't really know how)
Reviewers: #mercurial, rmcelroy, ikostia, medson
Reviewed By: medson
Subscribers: mjpieters, medson
Differential Revision: https://phabricator.intern.facebook.com/D6151931
Tasks: T23027803
Signature: 6151931:1508964509:65806961cbde26884cd45def17767135ceeac05f
Upstream has added devel warnings that require us to register all the configs
and remove the defaults that are specified at read time. This doesn't fix all
the cases, but is the start.
Differential Revision: https://phab.mercurial-scm.org/D1206
Upstream has renamed this config. Since the old config name was still an alias
for the new name, it was technically only breaking the test output where we
hardcoded the config name in the output. But I went ahead and updated every
place anyways.
Differential Revision: https://phab.mercurial-scm.org/D1209
In 272dd7d8a1bb1b2e93697b5b65183b08c8bf0853 upstream hg commit phase pushes
started to use separate bundle2 part. Because of that:
1) pushkey hook is not called when updating phases.
2) pushkey bundle2 part doesn't process phases anymore, 'phase-heads' part do
it instead.
It caused breakages in pushrebase. This diff fixes it.
Test Plan:
Run tests test-pushrebase* and test-treemanifest*
Differential Revision: https://phab.mercurial-scm.org/D1204
Previously test-treemanifest-treeonly.t was hanging. Now it doesn't hang (but
still fails).
It obviously doesn't fix the real issue, but at least it doesn't make test
hang.
Test Plan:
Run test-treemanifest-treeonly.t
Differential Revision: https://phab.mercurial-scm.org/D1205
Some environments configure a separate certificate store, and SSL connections
can fail if the wrong store is auto-discovered or no store exists.
This makes the client tied to the specific certificates used, so update the
client cache to key on the ca_certs value passed in.
Differential Revision: https://phab.mercurial-scm.org/D1194
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