Commit Graph

12 Commits

Author SHA1 Message Date
Jun Wu
6c1131c6e7 newdoc: revise WritingExtensions
Summary: Fill in an revset example. Clarify some other places.

Reviewed By: sfilipco

Differential Revision: D14430873

fbshipit-source-id: ae4a8996f8254f1ad374effe3a3da0ce9d2306eb
2019-03-14 11:51:39 -07: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
cbab61fcab doc: fix a typo
Summary: Code block starts with `::`, not `:` in rst.

Reviewed By: kulshrax

Differential Revision: D13389445

fbshipit-source-id: 35e2948154e71b91c7c7f2cacfa3f9ed8b312521
2018-12-11 11:49:20 -08:00
Jun Wu
f504f4d8a4 doc: rewrite WritingTests
Summary:
Rewrite it. Add more modern features. Pay less attention on run-tests.py flags
or shell portability issues, since we're enforcing bash already.

Reviewed By: phillco

Differential Revision: D10503344

fbshipit-source-id: 535494d4f1ecccb2b4a45bc6929b6f7398bde70d
2018-12-05 19:42:54 -08:00
Jun Wu
65a5c67b42 doc: rewrite WritingExtensions
Summary:
This is a shorter, rewritten version of "WritingExtensions".

"WritingExtensions" is too verbose and some code examples are outdated.

Reviewed By: markbt

Differential Revision: D10287050

fbshipit-source-id: f989172c4a683142983e17d3fa9dbddfd8252586
2018-11-15 18:22:31 -08:00
Jun Wu
55fbb96e31 doc: add QuickStart
Summary: Briefly introduce how to build, test, the directory layout, and coding style.

Reviewed By: markbt, phillco

Differential Revision: D10287048

fbshipit-source-id: b4875c0f1af91b605e328af957d0a357db07b71c
2018-10-24 18:59:14 -07:00
Jun Wu
f24f595b7f doc: remove unhelpful documents
Summary:
Clean up the less helpful documents.
- GeneralDelta: Mostly about migration. We're already migrated.
- RepositoryLayoutRequirements: Mostly about migration. We're already migrated.
- Revlog: Ancient. Not used in production.
- HttpCommandProtocol: Lack of content. Not really used in production.
- SshCommandProtocol: Lack of content.

Reviewed By: phillco

Differential Revision: D10287049

fbshipit-source-id: 54d2b00f146057a8a246c284043adc651db478d8
2018-10-24 18:59:14 -07:00
Jun Wu
187ea10228 doc: put a warning on index page
Summary:
The index is currently useful for easier browsing but otherwise not really
helpful for new developers. I'd like to re-arrange it so it is more friendly to
new developers and do not have incomplete or legacy content. Before I'm able
to get all needed sub pages. Let's put a warning on the index to mark it as
a WIP.

Note: the following commits change the index page, but the changed part is
not final. I plan to rewrite the TOC entirely after more pages are ready.

Reviewed By: markbt

Differential Revision: D10287047

fbshipit-source-id: 11432b3d43b733ccd4040a756c8520878114e027
2018-10-22 16:46:44 -07:00
Jun Wu
0325d0e572 doc: add Markdown support
Summary: Markdown is an alternative to rst.

Reviewed By: markbt

Differential Revision: D10287045

fbshipit-source-id: 6079c20bb59b71ecc785f92a13b7ce6bd1c76f07
2018-10-22 16:46:44 -07:00
Mark Thomas
ab55bd31c6 newdoc: fix test failures and warnings
Summary:
Remove newdoc from test-check-code - it's a Sphinx project, so MiniRST
checks don't apply.  Also remove the unused imports from the Sphinx config
file.

Reviewed By: farnz

Differential Revision: D9851834

fbshipit-source-id: c17e83fd96d39423eeedfb8a6cfae382f88c4d5f
2018-09-17 08:56:40 -07:00
Mark Thomas
f0957edea7 newdoc: Add documentation from the upstream Mercurial wiki
Summary:
Add information about writing and debugging tests and extensions, as well as
some internals documentation.

Reviewed By: quark-zju

Differential Revision: D9789497

fbshipit-source-id: f1123ea85e76d4ab919dafa26a13142b6cddb3c9
2018-09-17 03:35:14 -07:00
Mark Thomas
7772a2e653 newdoc: add skeleton for Developer Guide
Summary: Add a skeleton for a new Developer Guide.  This is built using Sphinx.

Reviewed By: quark-zju

Differential Revision: D9789496

fbshipit-source-id: d32233e76701789ca5f2327bea270a366776b34e
2018-09-17 03:35:14 -07:00