diff hgext/lfs/wireprotolfsserver.py @ 37617:b03f2e0fdb88

lfs: teach the blob server to handle --prefix
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 12 Apr 2018 17:24:55 -0700
parents 9640ccf44ac0
children 726c4102db9e
line wrap: on
line diff
--- a/hgext/lfs/wireprotolfsserver.py	Thu Apr 05 15:42:40 2018 -0400
+++ b/hgext/lfs/wireprotolfsserver.py	Thu Apr 12 17:24:55 2018 -0700
@@ -215,8 +215,8 @@
 
         rsp['actions'] = {
             '%s' % action: {
-                # TODO: Account for the --prefix, if any.
-                'href': '%s/.hg/lfs/objects/%s' % (req.baseurl, oid),
+                'href': '%s%s/.hg/lfs/objects/%s'
+                    % (req.baseurl, req.apppath, oid),
                 # datetime.isoformat() doesn't include the 'Z' suffix
                 "expires_at": expiresat.strftime('%Y-%m-%dT%H:%M:%SZ'),
                 'header': {