Summary:
If the user is using remote bookmarks, let's hide the public heads from the
smartlog output. This allows the server to do a non-fastward bookmark move,
without having the old heads cluttering the user's smartlog output.
Test Plan: Added a test
Reviewers: mitrandir, rmcelroy, ericsumner, lcharignon
Reviewed By: lcharignon
Differential Revision: https://phabricator.fb.com/D2264878
Signature: t1:2264878:1437505970:664348ed91ba8d8b1018299e282ed4308bfbdbc0
Summary:
The master revset config was not using scmutil.revrange/revsingle so it wasn't
able to handle bookmark names like 'foo-bar'. Let's use them.
Test Plan: Added a test
Reviewers: rmcelroy, sid0, lcharignon, ericsumner
Differential Revision: https://phabricator.fb.com/D2082328
Tasks: 7116971
Summary:
When using evolve with the inhibit extension, calling a revset can change the
changelog (since which revs are filtered can change). This affects smartlog
because it tries to cache the changelog functions early on, and there operates
on an old changelog.
Fix this by caching the changelog functions after we've performed the revset.
Test Plan: hg sl -r '<hidden commit> + .'
Reviewers: lcharignon, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D2033643
Signature: t1:2033643:1430357541:21c7a8c07ea8d145af4db40b835a3309239bbe6a
Summary:
The smartlog rev option wasn't resolving names right because it used
the wrong internal api. Fixes that.
Test Plan: Adds a test
Reviewers: lcharignon, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D2033646
Signature: t1:2033646:1430346864:be69cfb5fe3892f51340546b1fbb341fabfffe14
Summary:
Previously smartlog failed when a branch head was not public.
Fix this and add a test to prevent regression.
Test Plan: New test, ./run-tests.py
Reviewers: ericsumner, sid0, mitrandir, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1866905
Tasks: 6120552
Signature: t1:1866905:1424799838:51d5f8501b20dc3757f825ba8a13d38eccec0bff
Summary:
With remotenames, we will not always have local bookmarks for important
commits. This introduces a way to ensure important remote bookmark names
are always shows in the commit graph.
Test Plan:
* ./run-tests.py
* manual testing in various repos with remotenames enabled
Reviewers: sid0, daviser, mitrandir, ericsumner, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1866949
Signature: t1:1866949:1424798937:ccae85fa3655cfe8171089a3295d42a483f18d08
Summary:
This allows each repo to specify a master revision other than ##master##,
##trunk##, or ##@##. This is especially useful when using the ##remotenames##
extension, since the remote bookmark might be of the form ##remote/master##.
Test Plan:
Set this cofig option in my repo's .hg/hgrc:
[smartlog]
master = smf/@
Then ran smartlog and it worked as if I had passed ##--master smf/@##
Reviewers: sid0, daviser, davidsp, ericsumner, mitrandir, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1840345
Signature: t1:1840345:1423625389:aec4d651a23747bc5fdce3f14b26158ad0ddf313
Summary:
I have some bookmarks for interesting code that I've stopped
development of indefinitely, and I don't want them cluttering
my smartlog output. This lets me add a config option like
[smartlog]
ignorebookmarks = abandoned/
so that smartlog won't force them to be included
Test Plan: ##run-test.py##
Reviewers: sid0, daviser, davidsp, mitrandir, rmcelroy, durham
Reviewed By: durham
Subscribers: calvinb, mpm, pyd, akushner
Differential Revision: https://phabricator.fb.com/D1812758
Signature: t1:1812758:1422567344:d44896000ea3f92dbd0b981fc26693066ab23ee1
Summary:
I wanted a way to see a commit in relation to the other smartlog entries, so
I refactored smartlog to provide a revset function for its default selections.
Test Plan: ##run-tests##
Reviewers: durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1794762
Tasks: 6057467
Signature: t1:1794762:1421888058:9b96d26f68b9b3bac24ef43db58fe8aa0299de37
Summary: `hg sl/slog/smartlog` has a new flag `--commit-info`, which shows the files changed in currently active commit.
Test Plan:
Modified & added & removed a file to in commit.
The deleted, unknown, ignored and clean are not relevant, when we are talking about a change in a commit - right?
hg sl
hg sl --commit-info
hg sl -T "blaa" --commit-info
hg slog
hg slog --commit-info
hg slog -T "blaa" --commit-info
Commit-info flag adds info under current commit about the added, modified & removed files.
hg sl --commit-info --stat
This looks weird as it shows the current commit changes twice. Should I care about this?
#in fb-hgext/tests
./run-tests.py test-smartlog.t
test passes.
Reviewers: sid0, pyd, davidsp, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1677101
Tasks: 5418936
Signature: t1:1677101:1415833805:975ce43aaaf1ccabe6a054d09a9e5f236447340f
Summary:
Use `first()` instead of `[0]`.
Also fix coloring under non-ANSI terminals (required to get the test working).
Test Plan: Ran the tests. Also ran `hg sl` with this in a few of my repos.
Reviewers: durham, davidsp, akushner, daviser, rmcelroy, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D1623808
Tasks: 5375006
Summary:
Use `first()` instead of `[0]`.
Also fix coloring under non-ANSI terminals (required to get the test working).
Test Plan: Ran the tests. Also ran `hg sl` with this in a few of my repos.
Reviewers: durham, davidsp, akushner, daviser, rmcelroy, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D1623808
Tasks: 5375006
Smartlog is supposed to sort commits such that master is a straight line on the
left. This broke in the last commit because we passed master as 'master' instead
of as a rev number to the sorter.
- Adds a -r flag that allows you to view the smartlog of any arbitrary set of
commits. It displays those commits, how they are related, and the common
ancestor.
- Fixes a dag bug where a node with ancestors from seperate lineages would not
have a line drawn to the first ancestor. This was because the fake node logic
overwrote the original fake node when it saw the second one.
- Fixes smartlog to work better with branches. Previously it only ever hid
commits that were ancestors of the 'master' commit. Now, if you are on a
different branch from the master, we will also show the tip most public commit
on that branch, and hide all of it's ancestors. If you are on the master
branch, nothing has changed.
- Add a warning message at the bottom of the output when we know we're hiding
old heads from you. Adds a --all flag for showing all heads, even old ones.
If the repo had a lots of heads, the ancestor revset would previously cause
a stack overflow in the revset parser. I changed it to not use revsets at all.
If the repo had a merge, the ancestor walk code was sometimes adding the
entire repo to the rev list. I changed it to only add nodes that are > the
common ancestor.
Added smartlog to the default pager attend list.