Mercurial > hg
changeset 16141:f346de4dff57 stable
largefiles: don't break filesets
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Mon, 20 Feb 2012 17:59:48 +0100 |
parents | 0e0060bf2f44 |
children | fceb2964fa6c |
files | hgext/largefiles/reposetup.py tests/test-largefiles.t |
diffstat | 2 files changed, 22 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/reposetup.py Mon Feb 13 17:22:35 2012 +0100 +++ b/hgext/largefiles/reposetup.py Mon Feb 20 17:59:48 2012 +0100 @@ -63,13 +63,21 @@ return man1 def filectx(self, path, fileid=None, filelog=None): try: - result = super(lfiles_ctx, self).filectx(path, - fileid, filelog) + if filelog is not None: + result = super(lfiles_ctx, self).filectx( + path, fileid, filelog) + else: + result = super(lfiles_ctx, self).filectx( + path, fileid) except error.LookupError: # Adding a null character will cause Mercurial to # identify this as a binary file. - result = super(lfiles_ctx, self).filectx( - lfutil.standin(path), fileid, filelog) + if filelog is not None: + result = super(lfiles_ctx, self).filectx( + lfutil.standin(path), fileid, filelog) + else: + result = super(lfiles_ctx, self).filectx( + lfutil.standin(path), fileid) olddata = result.data result.data = lambda: olddata() + '\0' return result
--- a/tests/test-largefiles.t Mon Feb 13 17:22:35 2012 +0100 +++ b/tests/test-largefiles.t Mon Feb 20 17:59:48 2012 +0100 @@ -994,4 +994,14 @@ C a/b/c/d/e.normal.txt C a/b/c/x/y.normal.txt +verify that largefiles doesn't break filesets + + $ hg log --rev . --exclude "set:binary()" + changeset: 0:41bd42f10efa + tag: tip + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: add files + + $ cd ..