Show mod/add/del files in a merge changeset

Micah Ransdell mjr578 at gmail.com
Wed Feb 11 11:38:38 CST 2009


There is an example that I have used in cmdutil -> changeset_templater, in
the _show function. Pretty much you are looking at the repository status
between the parent and changectx you are looking at. You get back three
lists, modified, added, and deleted files.

..snip...
        files = []
        def getfiles():
            if not files:
                files[:] = self.repo.status(
                    log.parents(changenode)[0], changenode)[:3]
            return files
...snip...

Hope that helps.

Micah

On Mon, Feb 9, 2009 at 7:25 PM, huazheng <geoffreyzheng at yahoo.com> wrote:

>
> Hi there. Is there a command option, or an API function to distinguish
> modified, added, and deleted files in a merge changeset?
>
> I'm sure I can figure it out from changectx.files() and parents, but it
> seems like a pretty basic thing that someone would have already done it.
>
> TortoiseHg seems to implement it in changeset.ChangeSet.diff_generator.
>
> Thanks!
> --
> View this message in context:
> http://www.nabble.com/Show-mod-add-del-files-in-a-merge-changeset-tp21927032p21927032.html
> Sent from the Mercurial mailing list archive at Nabble.com.
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20090211/e54e553a/attachment.htm 


More information about the Mercurial mailing list