A Scalable, User-Friendly Source Control System.
Go to file
Durham Goode 5cd2a69ed5 Fix status on files in included subdirs
Summary:
There was a bug where if you included 'dir1/dir2/' in your sparse checkout, then
status would not show newly added files in that directory. The problem is that
dir1 is considered ignored, so the status walker would not walk down dir1.

The fix is to explicitly match subdirectories of specified include patterns.

Test Plan: Added a test

Reviewers: pyd, rmcelroy, lcharignon, sid0

Reviewed By: sid0

Differential Revision: https://phabricator.fb.com/D2021037

Tasks: 6773875

Signature: t1:2021037:1429899282:3e305afa9ed395473dbe11d80abc43becb9eaa4a
2015-04-24 09:52:00 -07:00
crecord crecord: update to latest default 2015-03-06 12:59:11 -08:00
tests Fix status on files in included subdirs 2015-04-24 09:52:00 -07:00
.hgignore Add gitrevset support. 2014-09-08 15:36:12 -07:00
b2xcompat.py add an extension to support the HG2Y format 2015-04-07 11:37:55 -07:00
backups.py Merge with default 2015-01-28 13:17:21 -08:00
chistedit.py chistedit: language improvements 2014-11-07 09:34:29 -08:00
COPYING Initial commit with extensions and readme 2014-06-02 12:54:54 -07:00
dbg.py dbg: an extension for a quick hg REPL 2015-02-24 10:50:23 -08:00
fbamend.py fbamend: configurable user education 2015-04-17 10:17:23 -07:00
fbhistedit.py fbhistedit: switch the exec action to be a histeditaction 2015-04-17 09:58:36 -07:00
githelp.py Githelp grep improvements 2015-04-21 10:21:17 -07:00
gitlookup.py gitgetmeta: update to work with upstream 2015-04-17 14:20:20 -07:00
gitrevset.py Merge fbonly into default 2015-03-08 12:22:25 -07:00
Makefile Initial commit: fbamend, smartlog 2013-06-20 12:16:36 -07:00
phabdiff.py Added phabdiff template mapping 2014-10-16 17:43:58 -07:00
phrevset.py [phrevset] Add ability to parse git revisions from Phabricator 2014-07-24 20:27:05 -07:00
pushrebase.py pushrebase: fix pushrebase to match upstream 2015-04-17 13:49:35 -07:00
rage.py Merge fbonly into default 2015-03-08 12:22:25 -07:00
README.md Merge fbonly into default 2015-03-08 12:22:25 -07:00
reflog.py Merge fbonly into default 2015-03-08 12:22:25 -07:00
reset.py reset: fix resetting to bookmarks with odd names 2015-04-24 13:10:58 -07:00
setup.py setup: get the b2xcompat extension installed 2015-04-14 08:59:23 -07:00
simplecache.py simplecache: update pathcopies wrapper signature 2015-04-17 10:00:47 -07:00
smartlog.py smartlog: fix to match upstream 2015-03-13 09:29:29 -07:00
sparse.py Fix status on files in included subdirs 2015-04-24 09:52:00 -07:00
tweakdefaults.py Merge fbonly into default 2015-03-08 12:22:25 -07:00
upgradegeneraldelta.py upgradegeneraldelta: only upgrade before pulls 2014-12-18 12:43:32 -08:00
writecg2.py writecg2: update to match upstream 2015-04-17 14:30:35 -07: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.