[PATCH 4 of 5 changedelete] merge.mergestate: update docstrings for preresolve and resolve

Siddharth Agarwal sid at less-broken.com
Thu Nov 5 20:55:39 CST 2015


On 11/5/15 17:34, Martin von Zweigbergk wrote:
>
> On Thu, Nov 5, 2015 at 12:14 AM Siddharth Agarwal <sid0 at fb.com 
> <mailto:sid0 at fb.com>> wrote:
>
>     # HG changeset patch
>     # User Siddharth Agarwal <sid0 at fb.com <mailto:sid0 at fb.com>>
>     # Date 1446709491 28800
>     #      Wed Nov 04 23:44:51 2015 -0800
>     # Node ID 7514e2e35e70661a7783668cf9cddd949ab9cd76
>     # Parent  14056ae3782ddc3fee4b4bb0b9557aa463e08f3c
>     merge.mergestate: update docstrings for preresolve and resolve
>
>     Add a docstring for preresolve, and update the one for resolve.
>
>
> This seems to make sense without the three patches before it, so I've 
> pushed it to the clowncopter.
>
> I'd prefer to see the other four patches squashed (they do very 
> similar things and it seems unlikely that only one of them would be 
> reverted) and be sent out with later patches that use the added return 
> value. Looking at only these four patches, they just add dead code and 
> I can't say whether it seems like that code will be useful later.

All four squashed into one, you mean?

These are preparatory patches, but the series that actually does things 
is long and complicated enough that I'd like to get all this landed first.

- Siddharth


>
>     diff --git a/mercurial/merge.py b/mercurial/merge.py
>     --- a/mercurial/merge.py
>     +++ b/mercurial/merge.py
>     @@ -397,10 +397,15 @@ class mergestate(object):
>              return complete, r
>
>          def preresolve(self, dfile, wctx, labels=None):
>     +        """run premerge process for dfile
>     +
>     +        Returns whether the merge is complete, and the exit code."""
>              return self._resolve(True, dfile, wctx, labels=labels)
>
>          def resolve(self, dfile, wctx, labels=None):
>     -        """rerun merge process for file path `dfile`"""
>     +        """run merge process (assuming premerge was run) for dfile
>     +
>     +        Returns the exit code of the merge."""
>              return self._resolve(False, dfile, wctx, labels=labels)[1]
>
>      def _checkunknownfile(repo, wctx, mctx, f, f2=None):
>     _______________________________________________
>     Mercurial-devel mailing list
>     Mercurial-devel at selenic.com <mailto:Mercurial-devel at selenic.com>
>     https://selenic.com/mailman/listinfo/mercurial-devel
>
>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list