hgext3rd/topic/revset.py
branchstable
changeset 4290 09337aae08d4
parent 4095 aabf436c11cb
child 4322 41f38bf15b4c
equal deleted inserted replaced
4289:cabe3b5d5139 4290:09337aae08d4
    80 def ngtipset(repo, subset, x):
    80 def ngtipset(repo, subset, x):
    81     """The untopiced tip.
    81     """The untopiced tip.
    82 
    82 
    83     Name is horrible so that people change it.
    83     Name is horrible so that people change it.
    84     """
    84     """
    85     args = revset.getargs(x, 1, 1, 'topic takes one')
    85     args = revset.getargs(x, 1, 1, 'ngtip takes one argument')
    86     # match a specific topic
    86     # match a specific topic
    87     branch = revset.getstring(args[0], 'ngtip() argument must be a string')
    87     branch = revset.getstring(args[0], 'ngtip requires a string')
    88     if branch == '.':
    88     if branch == '.':
    89         branch = repo['.'].branch()
    89         branch = repo['.'].branch()
    90     return subset & revset.baseset(destination.ngtip(repo, branch))
    90     return subset & revset.baseset(destination.ngtip(repo, branch))
    91 
    91 
    92 @revsetpredicate('stack()')
    92 @revsetpredicate('stack()')
    93 def stackset(repo, subset, x):
    93 def stackset(repo, subset, x):
    94     """All relevant changes in the current topic,
    94     """All relevant changes in the current topic,
    95 
    95 
    96     This is roughly equivalent to 'topic(.) - obsolete' with a sorting moving
    96     This is roughly equivalent to 'topic(.) - obsolete' with a sorting moving
    97     unstable changeset after there future parent (as if evolve where already
    97     unstable changeset after there future parent (as if evolve where already
    98     run)."""
    98     run).
    99     err = 'stack() takes no argument, it works on current topic'
    99     """
       
   100     err = 'stack takes no arguments, it works on current topic'
   100     revset.getargs(x, 0, 0, err)
   101     revset.getargs(x, 0, 0, err)
   101     topic = None
   102     topic = None
   102     branch = None
   103     branch = None
   103     if repo.currenttopic:
   104     if repo.currenttopic:
   104         topic = repo.currenttopic
   105         topic = repo.currenttopic