--- a/mercurial/revset.py Sun May 13 01:12:26 2012 -0400
+++ b/mercurial/revset.py Tue Jun 05 20:35:34 2012 -0400
@@ -186,6 +186,16 @@
raise error.ParseError(_("missing argument"))
return methods[x[0]](repo, subset, *x[1:])
+def _getrevsource(repo, r):
+ extra = repo[r].extra()
+ for label in ('source', 'transplant_source', 'rebase_source'):
+ if label in extra:
+ try:
+ return repo[extra[label]].rev()
+ except error.RepoLookupError:
+ pass
+ return None
+
# operator methods
def stringset(repo, subset, x):