A Scalable, User-Friendly Source Control System.
Go to file
Phil Cohen eb2814985f resolve: add internal:dumpjson as an internal merge tool (as an extension, for now)
Summary:
This basically takes the last upstream version of my conflictinfo patch and makes it an extension, so we can get it out to FB/Nuclide users
a bit faster. @asriram has already been developing with this version as a personal extension for a couple of weeks.

I still plan to ship the upstream version through after the freeze ends -- when that happens, we can delete this extension. During the time the two
versions overlap, they shouldn't conflict. (The extension version will still run over the internal version until it's disabled, though.)

Review-wise, this is similar to the last upstream version, except it adds the "command" key that indicates which command generated the conflicts (based on which mutually-exclusive state file exists), and incorporates most of the feedback.

Test Plan: Added a test and ran associated tests.

Reviewers: #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, asriram, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4944709

Signature: t1:4944709:1493148790:a4e798f5bd17ada767ae6c96fe8c8ab973960383
2017-04-25 12:46:28 -07:00
cdatapack c-extensions: fixup some compiler/environment portability concerns 2017-04-12 16:34:53 -07:00
cfastmanifest c-extensions: fixup some compiler/environment portability concerns 2017-04-12 16:34:53 -07:00
clib port upgrades of buffer.h into clib 2016-08-26 17:14:52 -07:00
contrib packaging: adding a few more small extensions to the Debian package 2017-04-24 10:00:31 -07:00
cstore treemanifest: fix ambiguous variable declaration 2017-04-20 12:31:59 -07:00
ctreemanifest treemanifest: chop off trailing slash when requesting manifests 2017-04-19 21:14:04 -07:00
fastannotate fix tests 2017-04-07 01:03:26 -07:00
fastmanifest treemanifest: automatically download missing trees on demand 2017-04-19 21:14:03 -07:00
hgext3rd resolve: add internal:dumpjson as an internal merge tool (as an extension, for now) 2017-04-25 12:46:28 -07:00
infinitepush infinitepush: add isbackedup command 2017-04-25 01:09:28 -07:00
linelog linelog: add some text about differences with revlog in README 2016-11-18 02:34:06 +00:00
p4fastimport p4fastimport: implement --bookmark 2017-04-25 15:29:39 +01:00
phabricator phabstatus: fail gracefully if necessary arcrc settings are missing 2017-03-30 11:55:39 -07:00
portability portability: add a portability header 2017-04-06 09:33:34 -07:00
remotefilelog treemanifest: improve progress during data repack 2017-04-19 21:14:04 -07:00
scripts scm-prompt: fix _dotfiles_scm_info 2017-04-25 10:56:35 -07:00
sqldirstate sqldirstate: add _otherparentset to match upstream 2017-03-12 12:49:18 -07:00
tests resolve: add internal:dumpjson as an internal merge tool (as an extension, for now) 2017-04-25 12:46:28 -07:00
treemanifest treemanifest: add test for prefetch with base nodes 2017-04-19 21:14:04 -07:00
.editorconfig Add editorconfig 2016-04-20 03:05:42 -07:00
.hgignore patchrmdir: new extension to workaround rmdir kernel issues 2017-03-15 18:55:48 -07:00
cfastmanifest.c fix: update manifest.diff usages to handle match arg 2017-03-12 10:14:35 -08:00
CMakeLists.txt Move ctreemanifest and cdatapack out of remotefilelog 2016-09-21 13:55:12 -07:00
COPYING Initial commit with extensions and readme 2014-06-02 12:54:54 -07:00
Makefile cdatapack: move libdatapack to be statically linked 2017-02-23 14:03:02 -08:00
README.md rewrite intro paragraph to README.md 2016-08-26 08:46:48 -07:00
setup.py c-extensions: fixup some compiler/environment portability concerns 2017-04-12 16:34:53 -07:00
statprof.py Added additional flags to statprof.py 2016-10-17 18:49:22 -07:00

fb-hgext

This is a collection of Mercurial extensions written at Facebook. Many of them are in heavy use by thousands of users on a daily basis. However, some of them are very specific to Facebook's very large repositories so their value to others will vary. We're still making these open source as examples of the workflows we use and direction we are working.

Note that there will be extensions included here that only work with Facebook's internal infrastructure; they are included to give you an idea of how we integrate mercurial with our workflows.

Below are snippets about some of the extensions contained here.

smartlog

An extension that adds the 'hg smartlog' command. It prints graph log output containing only the commits relevant to yourself. Shows your bookmarks, the @ or master bookmark, and any draft commits without bookmarks that you've made within the past 2 weeks. Any commits in the graph that are skipped are represented by '...'.

We recommend also having an 'hg sl' alias that gives more concise output:

alias.sl=smartlog --template "{shortest(node)}  {author|user}  {bookmarks % '{ifeq(bookmark, current, label(\"yellow\", \" {bookmark}*\"), label(\"green\", \" {bookmark}\"))}'} {ifeq(branch, 'default', '', label(\"bold\", branch))}\n{desc|firstline}\n\n"

githelp

An extension that adds the 'hg githelp' command. It translates Git commands into Mercurial commands. Example:

$ hg githelp -- git rebase origin/master
  hg rebase -d master

$ hg githelp -- reset --hard HEAD^
  hg strip -r .

So it acts as a useful cheat sheet tool for people moving from Git to Mercurial.

backups

An extension that adds the 'hg backups' command. 'hg backups' prints a list of recently deleted commits (by reading your .hg/strip-backups directory) and allows you to recover a commit by doing 'hg backups --recover '. It prints the missing commits in reverse chronological order, and acts as a pseudo-replacement for Git's reflog.

fbamend

An extension that adds the 'hg amend --rebase' command. When working with a stack of commits, it's currently impossible to amend a commit in the middle of the stack. This extension enables that ability, adds a 'hg amend' command that invokes 'hg commit --amend', and adds a --rebase flag to 'hg amend --rebase' that rebase all the children of the commit onto the newly amended version.

If 'hg amend' is run on a commit in the middle of a stack without using --rebase, the amend succeeds and the old version of the commit is left behind with a marker bookmark on it 'bookmarkname(preamend)'. The user can then run 'hg amend --fixup' to post-humously rebase the children onto the new version of the commit.

uncommit

Adds a 'hg uncommit' command, which undoes the effect of a local commit. This allows you to either undo a mistake, or remove files from a commit which weren't intended for it.

By default it uncommits all the files, and completely hides the changeset. However, if filenames are specified then it will create a new changeset excluding those files and leave the files in a dirty state in the working dir. In all cases, files are left unchanged in the working dir, so other local changes are unaffected.

Uncommit does work in the middle of a stack of changes (possibly creating a new head), but cannot be used to undo a merge changeset.

chistedit

An interactive ncurses interface to histedit.

NOTE: This requires python-curses installed and Mercurial's histedit extension enabled.

This extensions allows you to interactively move around changesets or change the action to perform while keeping track of possible conflicts.

upgradegeneraldelta

Upgrades manifests to generaldelta in-place, without needing to reclone.

Contributing

Patches are welcome as pull requests, though they will be collapsed and rebased to maintain a linear history.

We (Facebook) have to ask for a "Contributor License Agreement" from someone who sends in a patch or code that we want to include in the codebase. This is a legal requirement; a similar situation applies to Apache and other ASF projects.

If we ask you to fill out a CLA we'll direct you to our online CLA page where you can complete it easily. We use the same form as the Apache CLA so that friction is minimal.

License

These extensions are made available under the terms of the GNU General Public License version 2, or any later version. See the COPYING file that accompanies this distribution for the full text of the license.