A Scalable, User-Friendly Source Control System.
Go to file
2016-02-10 00:01:29 -08:00
copytrace cleanup: make all the code compliant with the i18n rules for ui strings 2016-01-11 10:19:22 -08:00
scripts fixing hg-new-workdir script problem 2015-11-30 22:07:59 +00:00
tests test-mergedriver.t: remove XXX that is no longer valid 2016-02-10 00:01:29 -08:00
.hgignore dbutil.py: remote database is SQL 2015-11-20 09:38:21 -08:00
automv.py Make fbamend responsible for supporting automv. 2016-02-04 11:03:31 +00:00
backups.py backups: show warning message for createmarkers even when evolve is not enabled 2016-01-11 07:41:42 -08:00
bundle2hooks.py [bundle2hooks] allow hook arguments to be stored on the operation object 2016-02-04 15:59:17 -08:00
catnotate.py catnotate: add whole extension 2015-10-16 02:45:27 -07:00
chistedit.py chistedit: appease check-code 2016-02-05 10:24:50 -08:00
commitextras.py extras: add commitextras extension 2015-04-27 20:20:48 -07:00
COPYING Initial commit with extensions and readme 2014-06-02 12:54:54 -07:00
dirsync.py dirsync: move mirroredfiles declaration out of if statement 2016-02-03 15:39:04 -08:00
errorredirect.py errorredirect: simplify environment variables 2015-12-17 20:28:31 +00:00
extorder.py extdeps extension 2015-12-11 17:57:58 -08:00
extutil.py extract replaceclass out of manifestdiskcache 2016-02-03 16:22:34 -08:00
fbamend.py Make fbamend responsible for supporting automv. 2016-02-04 11:03:31 +00:00
fbconduit.py cleanup: make all the code compliant with the i18n rules for ui strings 2016-01-11 10:19:22 -08:00
fbhistedit.py fbhistedit: update to work with upstream histedit 2016-01-20 13:40:15 -08:00
githelp.py Added githelp -- apply functionality and associated test. 2016-01-25 05:12:54 -08:00
gitlookup.py cleanup: fix the "line too long" warnings 2016-01-07 18:30:24 -08:00
gitrevset.py gitrevset: fix broken test caused by core's commit 48d6be2f1632 2015-05-07 17:46:30 -07:00
hg point symlink to the right place 2016-02-08 14:27:32 -08:00
inhibitwarn.py cleanup: fix the "line too long" warnings 2016-01-07 18:30:24 -08:00
Makefile Initial commit: fbamend, smartlog 2013-06-20 12:16:36 -07:00
manifestdiskcache.py extract replaceclass out of manifestdiskcache 2016-02-03 16:22:34 -08:00
mergedriver.py mergedriver: add an option to resolve to skip merge driver 2015-12-02 22:58:57 -08:00
morestatus.py cleanup: fix naked exception clauses 2016-01-07 18:30:24 -08:00
perftweaks.py perftweaks: change revlog delta heuristic 2015-11-24 15:18:39 -08:00
phabdiff.py cleanup: fix the "line too long" warnings 2016-01-07 18:30:24 -08:00
phabstatus.py phabstatus: improve reliability when conduit is down or sending errors 2016-01-14 10:45:47 -08:00
phrevset.py Don't crash in phrevset if Conduit replies before linear search completes 2016-01-21 08:11:13 -08:00
pullcreatemarkers.py pullcreatemarkers: add landed attribute to markers 2016-02-08 09:54:52 -08:00
pushrebase.py pushrebase: change supportedversions to supportedoutgoingversions 2016-02-08 14:47:54 -08:00
pushvars.py cleanup: make pushvars pass check-code 2015-12-23 14:43:05 -08:00
rage.py cleanup: replace all the calls to util.Abort to error.Abort 2016-01-07 18:30:24 -08:00
README.md Merge fbonly into default 2015-03-08 12:22:25 -07:00
reflog.py reflog: make the code check-code compliant 2016-01-11 10:34:36 -08:00
reset.py cleanup: fix spacing (2 vs 4 spaces) 2016-01-07 18:30:24 -08:00
setup.py [bundle2hooks] allow hook arguments to be stored on the operation object 2016-02-04 15:59:17 -08:00
show.py Turn off git diff by default in 'hg show' 2016-01-12 11:24:35 -08:00
simplecache.py cleanup: fix naked exception clauses 2016-01-07 18:30:24 -08:00
smartlog.py fix some check-code violations 2016-02-04 16:24:31 -08:00
sparse.py [sparse] fix check-code errors in sparse 2016-02-08 14:27:09 -08:00
statprof.py cleanup: add test-check-code-hg.t 2016-01-11 10:19:22 -08:00
tweakdefaults.py tweakdefaults: support pull --rebase -d <dest> without remotenames 2016-02-05 10:02:41 -08:00
upgradegeneraldelta.py cleanup: make upgradegeneraldelta pass check-code 2015-12-29 11:35:38 -08:00

hg-experimental

This is a collection of proof-of-concept Mercurial extensions written at Facebook. While they are all in basic use, they are considered experimental, are unsupported, and may or may not receive updates in the future. We're making them open source as examples of some better workflows we've been experimenting with.

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

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.

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.