Patchwork [4,of,7,PoC] largefiles: use standintolargefiles decorator for merge

login
register
mail settings
Submitter Mads Kiilerich
Date Sept. 22, 2014, 9:13 a.m.
Message ID <ff4cf5fee9f9e080735f.1411377217@localhost.localdomain>
Download mbox | patch
Permalink /patch/5911/
State Deferred
Headers show

Comments

Mads Kiilerich - Sept. 22, 2014, 9:13 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1411377060 -7200
#      Mon Sep 22 11:11:00 2014 +0200
# Node ID ff4cf5fee9f9e080735f1c86a4e032a91f404cf6
# Parent  3abe2ed48c72df36e1a6c15be86541569df6852b
largefiles: use standintolargefiles decorator for merge

Not really used as long as we have mergeupdate mocking.

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -347,6 +347,10 @@  def overridedebugstate(orig, ui, repo, *
 def overrideupdate(orig, ui, repo, *pats, **opts):
     return orig(ui, repo, *pats, **opts)
 
+@lfutil.standintolargefiles(printmessage=False, normallookup=True)
+def overridemerge(orig, ui, repo, *pats, **opts):
+    return orig(ui, repo, *pats, **opts)
+
 # Before starting the manifest merge, merge.updates will call
 # _checkunknown to check if there are any files in the merged-in
 # changeset that collide with unknown files in the working copy.
diff --git a/hgext/largefiles/uisetup.py b/hgext/largefiles/uisetup.py
--- a/hgext/largefiles/uisetup.py
+++ b/hgext/largefiles/uisetup.py
@@ -77,6 +77,8 @@  def uisetup(ui):
 
     entry = extensions.wrapcommand(commands.table, 'update',
                                    overrides.overrideupdate)
+    entry = extensions.wrapcommand(commands.table, 'merge',
+                                   overrides.overridemerge)
     entry = extensions.wrapcommand(commands.table, 'pull',
                                    overrides.overridepull)
     pullopt = [('', 'all-largefiles', None,
diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
--- a/tests/test-largefiles.t
+++ b/tests/test-largefiles.t
@@ -1610,6 +1610,7 @@  Merge with revision with missing largefi
   1 largefiles updated, 0 removed
   4 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
+  large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob)
 
   $ hg rollback -q
   $ hg up -Cq