Commit Graph

31 Commits

Author SHA1 Message Date
Liubov Dmitrieva
93057c645f codeformat - remove weird looking + for string concat on the same line
Summary:
These was probably introduced by moving to black.

The changes in the diff were generated by script.

Reviewed By: mitrandir77, singhsrb

Differential Revision: D14439667

fbshipit-source-id: 54f6e0bdcc59c1c6deb4eea46dc6f865bcd48cf8
2019-03-13 11:40:26 -07:00
Jun Wu
9e0a7c41a4 subrepo: remove subrepo support
Summary:
Subrepo is another unloved features that we don't want to support.

Aggressively remove it everywhere, instead of just turning off configs.

I didn't spend much time to split this commit so it's smaller and more friendly
to review. But it seems tests are passing.

Reviewed By: sfilipco

Differential Revision: D14220099

fbshipit-source-id: adc512a047d99cd4bafd0362e3e9b24e71defe13
2019-03-11 10:43:55 -07:00
Mark Thomas
a574573d52 fs: add stats subcommands
Summary: Add `hg fs stats` for the edenfs stats commands.

Reviewed By: chadaustin

Differential Revision: D14007060

fbshipit-source-id: 453133d04867a90fd7a40bc05288e35ae56fad93
2019-03-08 06:02:22 -08:00
Mark Thomas
e7bd8088ef fs: add other subcommands
Summary: Add `hg fs` subcommands for the other main `edenfsctl` commands.

Reviewed By: chadaustin

Differential Revision: D14007062

fbshipit-source-id: 9b5f56b14b5812216c929232b2697233f38288cc
2019-03-08 06:02:22 -08:00
Mark Thomas
c202c9953b fs: add start, stop and restart subcommands
Summary:
Add `hg fs start`, `hg fs stop` and `hg fs restart` subcommands to start, stop
and restart the eden daemon.

Reviewed By: chadaustin

Differential Revision: D13888876

fbshipit-source-id: ab190675d2b2ad56f38d723d1859f516aa3165e8
2019-03-08 06:02:21 -08:00
Mark Thomas
13a768d274 debugcommands: support mutation store in debugmutation
Summary:
The debugmutation command should also show information about mutation entries
in the mutation store.

Reviewed By: DurhamG, quark-zju

Differential Revision: D12980785

fbshipit-source-id: 06c3ec2cb9c42edf43729ba3b7c471b1bf8dfb96
2019-03-08 03:05:57 -08:00
Mark Thomas
6ff8a8a394 mutation: create common access methods for mutation information
Summary:
We will be making looking up entries for complex by adding a secondary store of
the information.  Make accesses to this information common through lookup
functions.

Reviewed By: quark-zju

Differential Revision: D13279986

fbshipit-source-id: a30084b548762e69cb354c3760d7ec66027a24e1
2019-03-08 03:05:57 -08:00
Mark Thomas
b059c3a3bf mutation: implement successorssets and foreground
Summary:
Implement successorssets and foreground in terms of mutation records and
replace them when mutation metadata usage is enabled.

Reviewed By: quark-zju

Differential Revision: D10149263

fbshipit-source-id: bbf6d1fc44a9787660147e15936a9ee1951373ca
2019-03-08 03:05:56 -08:00
Adam Simpkins
b360d9ee62 make debugedenimporthelper require an --out-fd argument
Summary:
When using the `debugedenimporthelper` subcommand that is part of `hg` itself
it is much more important to make sure that we don't try to use `stdout` as
the import communication mechanism.

The old `hg_import_helper.py` script more carefully set up its own `UI` object
to try and avoid ever printing any messages to `stdout`.  However it isn't
easily possible to do this as part of the normal `hg` program.  Therefore
abort the command if `hg debugedenimporthelper` is ever run without an
`--out-fd` argument.

This also helps avoid potentially confusing users by printing binary data to
stdout if they invoke accidentally `hg debugedenimporthelper` interactively in
a terminal.

Reviewed By: chadaustin

Differential Revision: D14222372

fbshipit-source-id: 7e0829dff41b2bca28c7f4539b90c6c354f8c79f
2019-02-27 13:44:29 -08:00
Adam Simpkins
a6832788b5 allow hg debugedenimporthelper to use the normal repo object
Summary:
This starts to fix some of the `hg debugedenimporthelper` behavior and make it
work more like most other hg subcommands with respect to how it finds the hg
repository.

Previously the code was copied into hg largely as-is from an external script
that took the repository path as a separate argument.  This resulted in
confusing behavior as it completely ignored the normal repository object
opened by `hg`.

This makes `debugedenimporthelper` honor the normal hg repo object if the
extra repository path argument is not specified.

Reviewed By: chadaustin

Differential Revision: D14222323

fbshipit-source-id: 57048178b588dd1dd7150184665d6c13427d6b56
2019-02-27 13:44:29 -08:00
Jun Wu
304e5c383b push: remove newbranch option
Summary:
`push --new-branch` is very rarely used and it does not make much sense with
checkheads removed (D14179861). Remove it everywhere.

There is still [one user](https://fburl.com/t5hmcxrp) of the
`push --new-branch` flag. Do not remove it just yet.

Reviewed By: singhsrb

Differential Revision: D14212180

fbshipit-source-id: 18f80576ab6464fc36b047a8a35b339231ee9d8e
2019-02-25 17:51:10 -08:00
Mark Thomas
9a19e06fee strip: move extension to core and rename to debugstrip
Summary:
Move the strip extension to core.  Rename the command to `hg debugstrip` as it
is not intended for use by users.  Users should use `hg hide` instead.

Reviewed By: quark-zju

Differential Revision: D14185822

fbshipit-source-id: ef096488cb94b72a7bb79f5bf153c064e0555b34
2019-02-25 03:55:08 -08:00
Jun Wu
f6c3848463 commands: remove more branch related CLI flags
Summary:
Remove:
- log --only-branch
- pull --branch
- push --branch
- record --close-branch
- incoming --branch
- outgoing --branch

Currently, `log --branch` is kept since some arcanist code still uses it.
We can probably remove it after the next arcanist release.

Differential Revision: D14116320

fbshipit-source-id: 50960ae8700200b322f615c4defd9c05353c2435
2019-02-20 20:05:29 -08:00
Mark Thomas
6ee252bb95 debugstatus: print the clock value stored in treestate
Summary: Add the current clock value to the output of `hg debugstatus`

Reviewed By: quark-zju

Differential Revision: D14150641

fbshipit-source-id: 917ac3095bc933c042c0f057d0dbda38ef710844
2019-02-20 11:01:52 -08:00
Jun Wu
f752c4dd75 commands: deprecate "hg id -b"
Summary:
There are still users of "hg id -b", namely shell prompt scripts.
However, it seems fine to remove "branch" from the formatted (JSON or other
formats) output.

Reviewed By: ikostia

Differential Revision: D14076296

fbshipit-source-id: a77f4b9e73161d322da3f1bdec993082ac463939
2019-02-14 17:44:40 -08:00
Jun Wu
dc38aa9d7a commands: remove "clone --branch" flag
Differential Revision: D14076299

fbshipit-source-id: dafbb7866e12e551b162a20ee048264866b67c96
2019-02-14 17:44:40 -08:00
Jun Wu
e257757924 commands: remove "bundle --branch" flag
Summary: Named branches are going away.

Differential Revision: D14076297

fbshipit-source-id: b68356f7075a6a8787cf0d2aa972bb27e1ef9bb1
2019-02-14 17:44:40 -08:00
Jun Wu
37af1cfda3 commands: remove "commit --close-branch" flag
Summary: Without named branch, it is not meaningful to close a branch.

Differential Revision: D14076295

fbshipit-source-id: 527ae457cb14f9415fa7269b7dc123252e7d6867
2019-02-14 17:44:40 -08:00
Jun Wu
35a58e8c24 commands: replace "branch" command with deprecation warnings
Summary:
Unfortunately, there are still users of the "hg branch" command so we cannot
remove it right now. But I'm updating internal tools to not call it.

Reviewed By: ikostia

Differential Revision: D14076300

fbshipit-source-id: a5322d9c9ce8148c6ad0800653bd829736556386
2019-02-14 17:44:40 -08:00
Jun Wu
82b4be9a7f config: hard-code ui.allowbranches=False
Summary: Since it's always False, remove the config option.

Reviewed By: ikostia

Differential Revision: D14076304

fbshipit-source-id: 2cc6409355a0c4514a62bc764e1deec0af1bd3a1
2019-02-14 17:44:40 -08:00
Jun Wu
9a87d9567c commands: remove "branches" command
Summary:
It seems nobody uses it from dev_commands logging. Search for "allowbranches"
in all internal repos suggests nobody turned it on. The tests were also
migrated to not use the command so let's just remove it.

Reviewed By: ikostia

Differential Revision: D14076298

fbshipit-source-id: a1cb03b2da289c01b15f0580ffe77531941be213
2019-02-14 17:44:40 -08:00
Mateusz Kwapich
4f58ae8678 config: stop lying about the config locations
Summary:
Since september (D9840431) rcutil.rccomponents is no longer source of truth
about which config files we load. In fact we use it only in the
`hg config --debug`. This leads to situations where the debug command mentions
loading a specific config file and then ignores it completely which is very
confusing.

Let's remove it.

Reviewed By: suitingtseng

Differential Revision: D14083220

fbshipit-source-id: 362fd9bf574e24639f99a1203206184da42d1e24
2019-02-14 09:31:58 -08:00
Jun Wu
64c43d2eab import: remove the --import-branch flag
Summary: Branches are going away.

Reviewed By: singhsrb

Differential Revision: D13978568

fbshipit-source-id: b9b4f3d2755757c0d3780bbb10c4579bf8d15fef
2019-02-12 19:54:31 -08:00
Jun Wu
b74ee0564d chg: make it incompatible with upstream chg server
Summary:
It would be massy if there are 2 chg servers running: one for fb hg, one for
upstream hg, and they share a same socket path.

Change socket path and the commandserver name so fb-hg chg can only talk to
fb-hg chg servers.

Reviewed By: markbt

Differential Revision: D13869319

fbshipit-source-id: f9d42af9bdfc542207f23c536b478fd5ef8d02a0
2019-02-08 16:12:53 -08:00
Aida Getoeva
baa9bab088 set ui.slash=True if HGPLAIN=1
Summary:
`hg status` should show slashes in filepaths standard for the diff format. Now it shows windows' backslash.

More details:
https://fb.workplace.com/groups/scm/permalink/1933867456662865/

Reviewed By: quark-zju

Differential Revision: D13944478

fbshipit-source-id: d34d2c6bc0b9966e1806e36668c21e8abfc83a02
2019-02-07 04:32:27 -08:00
Jun Wu
eaebf8d02d commands: drop unnecessary "config(..., default=...)"
Summary:
The default value is specified in configitems.py. Remove the `default`
argument.

Reviewed By: phillco

Differential Revision: D13909730

fbshipit-source-id: ca45c63be7d48e04e71a6f5b3b682f625a3030f6
2019-02-05 20:36:03 -08:00
Fatih Aydin
64bd91b7f4 commands: add option to disable the outgoing command
Summary: Extend the option to disable `incoming` to also disable `outgoing`.

Reviewed By: markbt

Differential Revision: D13877971

fbshipit-source-id: c4f994d536dda5db7c0e9f14656be48fc757c237
2019-02-04 14:25:27 -08:00
Fatih Aydin
7e7faeea81 commands: add option to disable the incoming command
Summary: In repositories which change quickly, the incoming and outgoing commands aren't useful.  Add an option to disable these commands.

Reviewed By: markbt

Differential Revision: D13859604

fbshipit-source-id: c4784b7eafbe3c4a6cf03686f1431204089b0155
2019-02-04 07:09:37 -08:00
Saurabh Singh
1752853929 commit: remove option to specify secret phase
Summary:
We will probably not be supporting secret phase in the future anyway
so lets get rid of it.

Reviewed By: quark-zju

Differential Revision: D13928907

fbshipit-source-id: 7edcd84d2ee3c37124dcf9d3ba92c0610d074157
2019-02-01 15:36:44 -08:00
Jun Wu
9dc21f8d0b codemod: import from the edenscm package
Summary:
D13853115 adds `edenscm/` to `sys.path` and code still uses `import mercurial`.
That has nasty problems if both `import mercurial` and
`import edenscm.mercurial` are used, because Python would think `mercurial.foo`
and `edenscm.mercurial.foo` are different modules so code like
`try: ... except mercurial.error.Foo: ...`, or `isinstance(x, mercurial.foo.Bar)`
would fail to handle the `edenscm.mercurial` version. There are also some
module-level states (ex. `extensions._extensions`) that would cause trouble if
they have multiple versions in a single process.

Change imports to use the `edenscm` so ideally the `mercurial` is no longer
imported at all. Add checks in extensions.py to catch unexpected extensions
importing modules from the old (wrong) locations when running tests.

Reviewed By: phillco

Differential Revision: D13868981

fbshipit-source-id: f4e2513766957fd81d85407994f7521a08e4de48
2019-01-29 17:25:32 -08:00
Jun Wu
c12e300bb8 codemod: move Python packages to edenscm
Summary:
Move top-level Python packages `mercurial`, `hgext` and `hgdemandimport` to
a new top-level package `edenscm`. This allows the Python packages provided by
the upstream Mercurial to be installed side-by-side.

To maintain compatibility, `edenscm/` gets added to `sys.path` in
`mercurial/__init__.py`.

Reviewed By: phillco, ikostia

Differential Revision: D13853115

fbshipit-source-id: b296b0673dc54c61ef6a591ebc687057ff53b22e
2019-01-28 18:35:41 -08:00