A Scalable, User-Friendly Source Control System.
Go to file
Saurabh Singh a995eb2fd1 amend: removing redundant commitfunc parameter in amend wrappers
Summary: cmdutil.amend was recently changed and the commitfunc parameter was
removed. This commit fixes the wrappers on the amend function by removing the
redundant parameter.

Test Plan: Ran the existing test suite
2017-09-08 10:07:41 -07:00
cdatapack cdatapack: move ntoh_data_offset out of linux ifdef 2017-09-01 16:03:20 -07:00
cfastmanifest sha1: provide wrapper functions around the SHA-1 implementation 2017-08-22 19:09:07 -07:00
clib clib: clean up include guards in the C/C++ header files 2017-08-25 16:46:07 -07:00
contrib contrib: add git-sl emulation of hg smartlog 2017-07-27 02:32:41 -07:00
cstore cstore: extend and refactor deltachain class 2017-09-07 08:07:30 -07:00
ctreemanifest clib: apply clang-tidy fixes to C/C++ code 2017-08-25 16:46:07 -07:00
fastmanifest fastmanifest: flush data when writepending is called 2017-08-28 10:43:07 -07:00
hgext3rd amend: removing redundant commitfunc parameter in amend wrappers 2017-09-08 10:07:41 -07:00
infinitepush infinitepush: update test to reflect upstream change 2017-08-22 21:58:37 -07:00
linelog linelog: make linelog build on Windows 2017-05-18 21:12:26 -07:00
phabricator conduit: cache and re-use conduit connections 2017-07-12 20:00:00 -07:00
prebuilt/cython cython: check-in generated c/cpp code from cython 2017-06-15 12:55:17 -07:00
remotefilelog remotefilelog: make pack cleanup more robust 2017-09-05 13:07:23 -07:00
scripts scm-prompt: fixup extraction of the commit when in eden 2017-08-30 14:25:18 -07:00
sqldirstate slqdirstate: fix test 2017-06-13 07:17:03 -07:00
tests dirsync: fixing mirroring following removal of redundant commit in amend 2017-09-08 10:01:05 -07:00
third-party/sha1dc sha1: update to the stable-v1.0.3 release of sha1collisiondetection 2017-08-22 19:09:07 -07:00
treemanifest treemanifest: fix non-tree repos when treemanifest is loaded 2017-08-31 11:14:39 -07:00
.clang-format build: check in a clang-format file 2017-08-22 19:09:07 -07:00
.editorconfig Add editorconfig 2016-04-20 03:05:42 -07:00
.hgignore arc: update config to work with external phabricator 2017-06-29 13:42:07 -07:00
cfastmanifest.c fix: update manifest.diff usages to handle match arg 2017-03-12 10:14:35 -08:00
COPYING Initial commit with extensions and readme 2014-06-02 12:54:54 -07:00
Makefile setup: add a command to remove extra build files 2017-05-02 09:12:56 -07:00
README.md Adding drop command 2017-07-18 21:57:03 -07:00
setup.py cstore: extend and refactor deltachain class 2017-09-07 08:07:30 -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 '...'.

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.

drop

Drops specified changeset from the stack. If the changeset to drop has multiple children branching off of it, all of them (including their descendants) will be rebased onto the parent commit. This command does not support dropping changeset which are a result of a merge (have two parent changesets). Public changesets cannot be dropped.

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.