##// END OF EJS Templates
lfs: rename {lfsattrs} to {pointer}...
Matt Harbison -
r35787:f00edef8 default
parent child Browse files
Show More
@@ -362,7 +362,7 b' def lfsfiles(repo, ctx, **args):'
362 362 pointers = wrapper.pointersfromctx(ctx) # {path: pointer}
363 363 files = sorted(pointers.keys())
364 364
365 def lfsattrs(v):
365 def pointer(v):
366 366 # In the file spec, version is first and the other keys are sorted.
367 367 sortkeyfunc = lambda x: (x[0] != 'version', x)
368 368 items = sorted(pointers[v].iteritems(), key=sortkeyfunc)
@@ -371,7 +371,7 b' def lfsfiles(repo, ctx, **args):'
371 371 makemap = lambda v: {
372 372 'file': v,
373 373 'oid': pointers[v].oid(),
374 'lfsattrs': templatekw.hybriddict(lfsattrs(v)),
374 'pointer': templatekw.hybriddict(pointer(v)),
375 375 }
376 376
377 377 # TODO: make the separator ', '?
@@ -865,16 +865,16 b" there's no 'lfs' destination repo requir"
865 865 oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024
866 866 size 29
867 867 x-is-binary 0
868 $ hg --cwd convert_lfs log -r 0 -T "{lfs_files % '{lfsattrs % '{key}={value}\n'}'}"
868 $ hg --cwd convert_lfs log -r 0 -T "{lfs_files % '{pointer % '{key}={value}\n'}'}"
869 869 version=https://git-lfs.github.com/spec/v1
870 870 oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024
871 871 size=29
872 872 x-is-binary=0
873 873 $ hg --cwd convert_lfs log -r 0 \
874 > -T '{lfs_files % "{get(lfsattrs, "oid")}\n"}{lfs_files % "{lfsattrs.oid}\n"}'
874 > -T '{lfs_files % "{get(pointer, "oid")}\n"}{lfs_files % "{pointer.oid}\n"}'
875 875 sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024
876 876 sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024
877 $ hg --cwd convert_lfs log -r 0 -T '{lfs_files % "{lfsattrs}\n"}'
877 $ hg --cwd convert_lfs log -r 0 -T '{lfs_files % "{pointer}\n"}'
878 878 version=https://git-lfs.github.com/spec/v1 oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 size=29 x-is-binary=0
879 879 $ hg --cwd convert_lfs \
880 880 > log -r 'all()' -T '{rev}: {lfs_files % "{file}: {oid}\n"}'
General Comments 0
You need to be logged in to leave comments. Login now