mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
smartlog: change unmaned head query to heads(draft())
Summary: The code falls back to head() if there are no remotenames. We don't need that behavior. Therefore just simplify it by always using `heads(draft())`. Reviewed By: DurhamG Differential Revision: D14436009 fbshipit-source-id: 25c2d245ed64a29e3e1677ededb4c2ba7b4a3ceb
This commit is contained in:
parent
260d3c9c44
commit
fa37745dd0
@ -563,14 +563,7 @@ def smartlogrevset(repo, subset, x):
|
||||
heads.update(repo.revs("."))
|
||||
|
||||
global hiddenchanges
|
||||
headquery = "head()"
|
||||
if remotebooks:
|
||||
# When we have remote bookmarks, only show draft heads, since public
|
||||
# heads should have a remote bookmark indicating them. This allows us
|
||||
# to force push server bookmarks to new locations, and not have the
|
||||
# commits clutter the user's smartlog.
|
||||
headquery = "heads(draft())"
|
||||
|
||||
headquery = "heads(draft())"
|
||||
allheads = set(repo.revs(headquery))
|
||||
if recentdays >= 0:
|
||||
recentquery = revsetlang.formatspec("%r & date(-%d)", headquery, recentdays)
|
||||
|
@ -82,8 +82,8 @@ Test configuration of "interesting" bookmarks
|
||||
@ 0 mybook
|
||||
|
||||
|
||||
Change remote master to a non-existing locally commit and check that warning
|
||||
is shown to the user
|
||||
Change remote master to a non-existing locally commit.
|
||||
|
||||
$ cat > .hg/remotenames << EOF
|
||||
> 6dd477f76ca35ae46e82972648735867cf335d3e bookmarks remote/master
|
||||
> EOF
|
||||
@ -101,5 +101,3 @@ is shown to the user
|
||||
date: Thu Jan 01 00:00:00 1970 +0000
|
||||
summary: x
|
||||
|
||||
note: hiding 3 old heads without bookmarks
|
||||
(use --all to see them)
|
||||
|
Loading…
Reference in New Issue
Block a user