Patchwork [5,of,7] largefiles: put same 'action' object back in 'newglist'

login
register
mail settings
Submitter Martin von Zweigbergk
Date Dec. 10, 2014, 9:09 p.m.
Message ID <3b6976a44ab9e1ecd2dd.1418245743@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/7048/
State Accepted
Commit 5a6d85bae97fb6fe830c125fdde8068761ce3104
Headers show

Comments

Martin von Zweigbergk - Dec. 10, 2014, 9:09 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1418147606 28800
#      Tue Dec 09 09:53:26 2014 -0800
# Node ID 3b6976a44ab9e1ecd2dd228c0269bc5319f9df2b
# Parent  d1e6b639fb6c687ac4614946de96eb3eb4c7c13f
largefiles: put same 'action' object back in 'newglist'

The items we put in 'newglist' are always the same as what we found in
actions['g'], so let's just put the same item into the list instead of
creating a new one.

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -443,7 +443,7 @@ 
                         '$$ &Largefile $$ &Normal file') % lfile
             if repo.ui.promptchoice(usermsg, 0) == 0: # pick remote largefile
                 actions['r'].append((lfile, None, 'replaced by standin'))
-                newglist.append((standin, (p2.flags(standin),), msg))
+                newglist.append(action)
             else: # keep local normal file
                 if branchmerge:
                     actions['k'].append((standin, None,
@@ -472,7 +472,7 @@ 
                     actions['a'].append((standin, None, 'keep standin'))
             else: # pick remote normal file
                 actions['r'].append((standin, None, 'replaced by non-standin'))
-                newglist.append((lfile, (p2.flags(lfile),), msg))
+                newglist.append(action)
         else:
             newglist.append(action)