##// END OF EJS Templates
pathutil: use `finddirs_rev_noroot` instead of `parts`...
pathutil: use `finddirs_rev_noroot` instead of `parts` The benefit this brings is very tiny, if it's even there, since we still didn't get rid of the [parts] computation. It probably won't be worth it without the subsequent patch that adds one more use of [finddirs_rev_noroot]

File last commit:

r49730:6000f5b2 default
r50803:789e152a default
Show More
stack.py
22 lines | 722 B | text/x-python | PythonLexer
Boris Feld
stack: add a new module for stack-related commands...
r37018 # stack.py - Mercurial functions for stack definition
#
Raphaël Gomès
contributor: change mentions of mpm to olivia...
r47575 # Copyright Olivia Mackall <olivia@selenic.com> and other
Boris Feld
stack: add a new module for stack-related commands...
r37018 #
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
Augie Fackler
style: run a patched black on a subset of mercurial...
r43345
Boris Feld
stack: add a new module for stack-related commands...
r37018 def getstack(repo, rev=None):
Boris Feld
stack: return a sorted smartrev by default...
r37022 """return a sorted smartrev of the stack containing either rev if it is
not None or the current working directory parent.
Boris Feld
stack: add a new module for stack-related commands...
r37018
The stack will always contain all drafts changesets which are ancestors to
the revision and are not merges.
"""
if rev is None:
Augie Fackler
formatting: byteify all mercurial/ and hgext/ string literals...
r43347 rev = b'.'
Boris Feld
stack: add a new module for stack-related commands...
r37018
Augie Fackler
formatting: byteify all mercurial/ and hgext/ string literals...
r43347 revspec = b'only(%s) and not public() and not ::merge()'
av6
stack: use repo.revs() instead of revsetlang.formatspec() + scmutil.revrange()...
r43230 revisions = repo.revs(revspec, rev)
Boris Feld
stack: return a sorted smartrev by default...
r37022 revisions.sort()
return revisions