def makememctx(repo, ctx, revmap, copyfilectxfn):
        parents = newparents(repo, ctx, revmap)
        # Need to make a copy otherwise modification is made on original,
        # which is just plain wrong.
        msg = encoding.fromlocal(ctx.description())
        new_msg, changed = addcommitid(msg, repo=repo)

        memctx = context.memctx(repo, parents,
                                encoding.tolocal(new_msg), ctx.files(),
                                copyfilectxfn, user=ctx.user(),
                                date=ctx.date(), extra=dict(ctx.extra()))

        return memctx
Beispiel #2
0
    def makememctx(repo, ctx, revmap, copyfilectxfn):
        parents = newparents(repo, ctx, revmap)
        # Need to make a copy otherwise modification is made on original,
        # which is just plain wrong.
        msg = encoding.fromlocal(ctx.description())
        new_msg, changed = addcommitid(msg, repo=repo)

        memctx = context.memctx(repo, parents,
                                encoding.tolocal(new_msg), ctx.files(),
                                copyfilectxfn, user=ctx.user(),
                                date=ctx.date(), extra=dict(ctx.extra()))

        return memctx
        def commit(self, *args, **kwargs):
            """Override commit to generate a unique commit identifier.

            The commit identifier is used to track a logical commits across
            history rewrites, including grafting. This is used as an index
            of sorts in the review tool.
            """
            msg = ''
            if args:
                msg = args[0]
            elif kwargs and 'text' in kwargs:
                msg = kwargs['text']
                del kwargs['text']

            if self.reviews.remoteurl and msg:
                msg, changed = addcommitid(msg, repo=self)

            return super(reviewboardrepo, self).commit(msg, *args[1:], **kwargs)
Beispiel #4
0
        def commit(self, *args, **kwargs):
            """Override commit to generate a unique commit identifier.

            The commit identifier is used to track a logical commits across
            history rewrites, including grafting. This is used as an index
            of sorts in the review tool.
            """
            msg = ''
            if args:
                msg = args[0]
            elif kwargs and 'text' in kwargs:
                msg = kwargs['text']
                del kwargs['text']

            if self.reviews.remoteurl and msg:
                msg, changed = addcommitid(msg, repo=self)

            return super(reviewboardrepo, self).commit(msg, *args[1:], **kwargs)