Skip to content

Instantly share code, notes, and snippets.

@palfrey
Created January 30, 2011 19:28
Show Gist options
  • Select an option

  • Save palfrey/803149 to your computer and use it in GitHub Desktop.

Select an option

Save palfrey/803149 to your computer and use it in GitHub Desktop.
# get all the open heads
heads = revs(repo, "head() & (! closed())")
# find the common ancestor of default and revision_number ...
ancestor = revs(repo, "ancestor(%d, default)"% revision_number )[0]
# ... then get the path of changes between the common ancestor
# and our original revision
path = revs(repo, "%d::%d"%(ancestor, revision_number))
# The above can also be done just as
path = revs(repo, "ancestor(%d, default)::%d" %(revision_number, revision_number))
# find all the revisions that change the files under patches/
patches = revs(repo, 'files("patches/*")')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment