hgext/largefiles/lfcommands.py
changeset 35563 4aa6ed598323
parent 35400 8a0cac20a1ad
child 36311 b9da10f310f4
--- a/hgext/largefiles/lfcommands.py	Fri Dec 15 09:30:16 2017 +0100
+++ b/hgext/largefiles/lfcommands.py	Thu Dec 21 13:53:26 2017 +0100
@@ -593,3 +593,12 @@
         (cached, missing) = cachelfiles(ui, repo, rev)
         numcached += len(cached)
     ui.status(_("%d largefiles cached\n") % numcached)
+
+@command('debuglfput',
+    [] + cmdutil.remoteopts,
+    _('FILE'))
+def debuglfput(ui, repo, filepath, **kwargs):
+    hash = lfutil.hashfile(filepath)
+    storefactory.openstore(repo).put(filepath, hash)
+    ui.write('%s\n' % hash)
+    return 0