886 """``obsolete()`` |
886 """``obsolete()`` |
887 Mutable changeset with a newer version.""" |
887 Mutable changeset with a newer version.""" |
888 getargs(x, 0, 0, _("obsolete takes no arguments")) |
888 getargs(x, 0, 0, _("obsolete takes no arguments")) |
889 return [r for r in subset if repo[r].obsolete()] |
889 return [r for r in subset if repo[r].obsolete()] |
890 |
890 |
|
891 def origin(repo, subset, x): |
|
892 """``origin([set])`` |
|
893 Changesets that were specified as a source for the grafts, transplants or |
|
894 rebases that created the given revisions. Omitting the optional set is the |
|
895 same as passing all(). If a changeset created by these operations is itself |
|
896 specified as a source for one of these operations, only the source changeset |
|
897 for the first operation is selected. |
|
898 """ |
|
899 if x is not None: |
|
900 args = set(getset(repo, range(len(repo)), x)) |
|
901 else: |
|
902 args = set(getall(repo, range(len(repo)), x)) |
|
903 |
|
904 def _firstsrc(rev): |
|
905 src = _getrevsource(repo, rev) |
|
906 if src is None: |
|
907 return None |
|
908 |
|
909 while True: |
|
910 prev = _getrevsource(repo, src) |
|
911 |
|
912 if prev is None: |
|
913 return src |
|
914 src = prev |
|
915 |
|
916 o = set([_firstsrc(r) for r in args]) |
|
917 return [r for r in subset if r in o] |
|
918 |
891 def outgoing(repo, subset, x): |
919 def outgoing(repo, subset, x): |
892 """``outgoing([path])`` |
920 """``outgoing([path])`` |
893 Changesets not found in the specified destination repository, or the |
921 Changesets not found in the specified destination repository, or the |
894 default push location. |
922 default push location. |
895 """ |
923 """ |