revert using APIs
Massimo Di Pierro
mdipierro at cs.depaul.edu
Mon Oct 25 01:09:39 UTC 2010
works. Thank a ton.
Would you also know hot do to an hg diff programmatically vs a given revision?
Massimo
On Oct 24, 2010, at 6:05 PM, FELD Boris wrote:
>
> You can try to update the repository to a specific revision like that :
>
> hg.update(repo, revision).
>
> The revision can be a revision number or a revision ID, but i'm not sure about that.
>
> --
> FELD Boris
>
> On lundi 25 octobre 2010 at 00:19, Massimo Di Pierro wrote:
>
>> Hello everybody,
>>
>> first of all thank you for mercurial. It is excellent.
>>
>> I am working on improving the web2py web interface to mercurial. 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'] = 'web2py at 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?
>>
>> Thanks for your help.
>>
>> Massimo
>>
>> _______________________________________________
>> Mercurial mailing list
>> Mercurial at selenic.com
>> http://selenic.com/mailman/lis tinfo/me rcurial
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20101024/b178bec1/attachment.html>
More information about the Mercurial
mailing list