[PATCH] update: --check should fail if untracked files would be lost (issue2450)

Matt Mackall mpm at selenic.com
Mon Jun 13 14:55:28 CDT 2011


On Mon, 2011-06-13 at 15:03 -0400, Mark Kendrat wrote:
> diff -r 17c0cb1045e5 -r 325b4aa6c5ea mercurial/merge.py
> --- a/mercurial/merge.py	Sat Jun 11 21:24:50 2011 +0800
> +++ b/mercurial/merge.py	Mon Jun 13 10:02:55 2011 -0900
> @@ -443,7 +443,14 @@
>                  if f:
>                      repo.dirstate.drop(f)
>  
> -def update(repo, node, branchmerge, force, partial, ancestor=None):
> +def updatecheck(repo, node, check, clean):
> +    update(repo, node, False, clean, None, safetychecksonly=True, check=check)
> +
> +def mergecheck(repo, node, force):
> +    update(repo, node, True, force, False, safetychecksonly=True, check=False)
> +
> +def update(repo, node, branchmerge, force, partial, ancestor=None,
> +        safetychecksonly=False, check=False):

Hmm, this isn't what I meant at all.

I meant literally rip the checks out of merge.py:update and put them in
two new functions. Let me take a stab at it.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list