Mercurial > hg
changeset 21209:c5d35995d192 stable
largefiles: better handling of log from other working directory (issue4236)
When invoked from another directory, the matchers m._cwd will be the absolute
path. The code for calculating relative path to .hglf did not consider that and
log would fail with weird errors and paths.
For now, just don't do any largefile magic when invoked from other directories.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 01 May 2014 15:12:49 +0200 |
parents | 0e1cbd3d52f7 |
children | 799c494189a9 |
files | hgext/largefiles/overrides.py tests/test-largefiles.t |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Thu May 01 09:42:23 2014 -0500 +++ b/hgext/largefiles/overrides.py Thu May 01 15:12:49 2014 +0200 @@ -270,6 +270,9 @@ pats = set(p) # TODO: handling of patterns in both cases below if m._cwd: + if os.path.isabs(m._cwd): + # TODO: handle largefile magic when invoked from other cwd + return matchandpats back = (m._cwd.count('/') + 1) * '../' pats.update(back + lfutil.standin(m._cwd + '/' + f) for f in p) else:
--- a/tests/test-largefiles.t Thu May 01 09:42:23 2014 -0500 +++ b/tests/test-largefiles.t Thu May 01 15:12:49 2014 +0200 @@ -773,6 +773,18 @@ @ 7:daea875e9014 | $ cd .. + +Test log from outside repo + + $ hg log b/sub -T '{rev}:{node|short} {desc|firstline}\n' + 6:4355d653f84f edit files yet again + 5:9d5af5072dbd edit files again + 4:74c02385b94c move files + 1:ce8896473775 edit files + 0:30d30fe6a5be add files + +Test clone at revision + $ hg clone a -r 3 c adding changesets adding manifests