D1806: filemerge: fix backing up an in-memory file to a custom location

jeffpc at josefsipek.net jeffpc at josefsipek.net
Thu Jan 4 14:56:28 EST 2018


On Thu, Jan 04, 2018 at 07:36:55PM +0000, phillco (Phil Cohen) wrote:
> phillco created this revision.
> Herald added a subscriber: mercurial-devel.
> Herald added a reviewer: hg-reviewers.
> 
> REVISION SUMMARY
>   If the user specifies a ui.origbackuppath, we used to always copy the file
>   there, but if the source file is in memory we must write it instead of copying.
> 
> REPOSITORY
>   rHG Mercurial
> 
> REVISION DETAIL
>   https://phab.mercurial-scm.org/D1806
> 
> AFFECTED FILES
>   mercurial/filemerge.py
> 
> CHANGE DETAILS
> 
> diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
> --- a/mercurial/filemerge.py
> +++ b/mercurial/filemerge.py
> @@ -618,6 +618,9 @@
>      (if any), the backup is used to undo certain premerges, confirm whether a
>      merge changed anything, and determine what line endings the new file should
>      have.
> +
> +    Backups are only need to be written for the premerge, and not again during

"Backups are only need to be" needs grammar :)

How about "Backups only need to be..."?

...
> +        if premerge:
> +            # Otherwise, write to wherever path the user specified the backups

s/wherever/whichever/ ?

Jeff.


More information about the Mercurial-devel mailing list