Hi Massimo, Ok, now I feel bad... I have not had the time to finish the integration app I promised... Much is done, but not yet complete... I still do intend on completing though... hopefully soon...
Until then, what is your intent here? are you looking to restore a fileset (or entire tree) to a specific version from repo (without changing meta data), are you looking to drop all meta changes, revert you local code line to known state? are you looking for a quick and dirty recipe like with combination of cmds to delete local changesets and revert to a speciic version (or #head revision) of the remote depot? like: delete local repo, then: hg init --> create new hg pull --> get a version hg update --> well, just update... Although, by reading your commit script, I'd say you're pretty handy with mercurial API as it is. anyways, depends what you are looking to do... I can give you some quick and dirty recipes if you like, if it helps. Mart :) On Oct 24, 6:23 pm, Massimo Di Pierro <[email protected]> wrote: > Hello everybody, > > I am working on improving the web2py web interface to mercurial. > > http://127.0.0.1:8000/admin/mercurial/commit > > We can current create a repo, commit and get changelog but I cannot figure > out how to do revert. > Here is the code I have: > > import os > uio = ui.ui() > uio.quiet = True > if not os.environ.get('HGUSER') and not uio.config("ui", "username"): > os.environ['HGUSER'] = 'web...@localhost' > try: > repo = hg.repository(ui=uio, path=path) > except: > repo = hg.repository(ui=uio, path=path, create=True) > > given repo and a revision number from repo.changelog, how to I revert all > files to that revision using the API? > > Massimo

