Actually I just did this with some help from Boris from the mercurial
mailing list.

Now if you run web2py from source ad you have mercurial installed
(easy_install mercurial) you can use the web2py admin to:

- create a repository (this is done automatically and it also makes
a .hgignore)
- commit file
- see log changes
- see list of files for each committed revision
- revert to past revision

(all by just clicking)

One important missing feature is the ability to get a diff vs a given
revision.
Another feature I would like to have is the ability to push from a web
repository or revert to it.



On Oct 24, 8:09 pm, mart <msenecal...@gmail.com> wrote:
> 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 <mdipie...@cs.depaul.edu> 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
>
>

Reply via email to