Patchwork [2,of,2] merge: remove obsolete check for untracked files in 'dm' action

login
register
mail settings
Submitter Martin von Zweigbergk
Date Nov. 24, 2014, 6:43 p.m.
Message ID <fd282b992094a9aebebd.1416854601@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6839/
State Accepted
Headers show

Comments

Martin von Zweigbergk - Nov. 24, 2014, 6:43 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1416851427 28800
#      Mon Nov 24 09:50:27 2014 -0800
# Node ID fd282b992094a9aebebd9d07231446342414665b
# Parent  d1a5b85dce66ff549e445408a8d3e43e7d1b832c
merge: remove obsolete check for untracked files in 'dm' action

Since 0776a6cababe (merge: don't use unknown(), 2012-02-09), untracked
files are no longer included in the manifest diff, so there is no need
to check exclude them when renaming files for directory moves with the
'dm' action.
Augie Fackler - Nov. 25, 2014, 3:25 p.m.
On Mon, Nov 24, 2014 at 10:43:21AM -0800, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1416851427 28800
> #      Mon Nov 24 09:50:27 2014 -0800
> # Node ID fd282b992094a9aebebd9d07231446342414665b
> # Parent  d1a5b85dce66ff549e445408a8d3e43e7d1b832c
> merge: remove obsolete check for untracked files in 'dm' action

Queued these two, thanks.

>
> Since 0776a6cababe (merge: don't use unknown(), 2012-02-09), untracked
> files are no longer included in the manifest diff, so there is no need
> to check exclude them when renaming files for directory moves with the
> 'dm' action.
>
> diff --git a/mercurial/merge.py b/mercurial/merge.py
> --- a/mercurial/merge.py
> +++ b/mercurial/merge.py
> @@ -897,9 +897,6 @@
>      # directory rename, move local
>      for f, args, msg in actions['dm']:
>          f0, flag = args
> -        if f0 not in repo.dirstate:
> -            # untracked file moved
> -            continue
>          if branchmerge:
>              repo.dirstate.add(f)
>              repo.dirstate.remove(f0)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -897,9 +897,6 @@ 
     # directory rename, move local
     for f, args, msg in actions['dm']:
         f0, flag = args
-        if f0 not in repo.dirstate:
-            # untracked file moved
-            continue
         if branchmerge:
             repo.dirstate.add(f)
             repo.dirstate.remove(f0)