# HG changeset patch # User Matt Harbison # Date 1342826081 14400 # Node ID acfab075458445e89d7bded4db58e07a6b53bce0 # Parent 8c31b652bdfe25f17394d67a4b0a260e31f5b651 largefiles: support revsets for cat Previous to this, cat only accepted revsets if the largefiles extension was disabled. diff -r 8c31b652bdfe -r acfab0754584 hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py Fri Jul 20 18:13:19 2012 -0400 +++ b/hgext/largefiles/overrides.py Fri Jul 20 19:14:41 2012 -0400 @@ -1075,8 +1075,8 @@ return result def overridecat(orig, ui, repo, file1, *pats, **opts): - rev = opts.get('rev') - if not lfutil.standin(file1) in repo[rev]: + ctx = scmutil.revsingle(repo, opts.get('rev')) + if not lfutil.standin(file1) in ctx: result = orig(ui, repo, file1, *pats, **opts) return result - return lfcommands.catlfile(repo, file1, opts.get('rev'), opts.get('output')) + return lfcommands.catlfile(repo, file1, ctx.rev(), opts.get('output')) diff -r 8c31b652bdfe -r acfab0754584 tests/test-largefiles.t --- a/tests/test-largefiles.t Fri Jul 20 18:13:19 2012 -0400 +++ b/tests/test-largefiles.t Fri Jul 20 19:14:41 2012 -0400 @@ -1032,6 +1032,10 @@ $ rm cat.out $ hg cat -r a381d2c8c80e normal3 normal3-modified + $ hg cat -r '.^' normal3 + normal3-modified + $ hg cat -r '.^' sub/large4 + large4-modified Test that renaming a largefile results in correct output for status