Status with Largefile Extension
Smith, Bill (Tridium)
bsmith at tridium.com
Tue Nov 13 00:40:20 UTC 2012
We have a case where we actually need to store win32 binaries in a mercurial
repo. We are currently doing this with the largefile extension. One problem we
have encountered is that there are a couple of *metadata* fields that the ms
compiler changes (like a timestamp) with each compile even if nothing has
really changed. They supply a utility called bindiff that can be used to
identify if the file has really changed. I created an extension that uses the
repo.status() call to identify the modified files. However, this only appears
to work with regular repos, not large file repos. Looking at
hgext/largefiles/reposetup.py, it appears that the call to status *should* be
routed through the override, however, it doesn't appear that that is
happening. I've added my command in my extensions with:
'tbindiff': (tbindiff,
[('r', 'revert', None, _('revert unchanged binaries'),
_('PATH')),],
_('hg tbindiff [-r | --revert]')),
And tbindiff does:
def tbindiff(ui, repo, *pats, **opts):
try:
repo.lfstatus
print 'large file repo'
except:
print 'standard repo'
print repo.status()[0]
The output of the last line is correct for regular repos, but not large file
repos.
Any thoughts or advice?
Bill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4600 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20121113/78b20498/attachment-0002.bin>
More information about the Mercurial-devel
mailing list