lfs: rename {oid} to {lfsoid}
Per Yuya, for consistency with {lfspointer}. It might be slightly confusing for
there to be {lfsoid} and {lfspointer.oid}. But preventing ambiguity seems more
important, and the latter is controlled by the git-lfs spec.
--- a/hgext/lfs/__init__.py Mon Jan 22 17:47:40 2018 -0500
+++ b/hgext/lfs/__init__.py Tue Jan 23 20:50:02 2018 -0500
@@ -370,7 +370,7 @@
makemap = lambda v: {
'file': v,
- 'oid': pointers[v].oid(),
+ 'lfsoid': pointers[v].oid(),
'lfspointer': templatekw.hybriddict(pointer(v)),
}
--- a/tests/test-lfs.t Mon Jan 22 17:47:40 2018 -0500
+++ b/tests/test-lfs.t Tue Jan 23 20:50:02 2018 -0500
@@ -877,7 +877,7 @@
$ hg --cwd convert_lfs log -r 0 -T '{lfs_files % "{lfspointer}\n"}'
version=https://git-lfs.github.com/spec/v1 oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 size=29 x-is-binary=0
$ hg --cwd convert_lfs \
- > log -r 'all()' -T '{rev}: {lfs_files % "{file}: {oid}\n"}'
+ > log -r 'all()' -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}'
0: a1: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024
1: a2: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024
2: a2: 876dadc86a8542f9798048f2c47f51dbf8e4359aed883e8ec80c5db825f0d943
@@ -987,7 +987,7 @@
$ echo '012345678901234567890' > nolfs.exclude
$ echo '01234567890123456' > lfs.catchall
$ hg ci -Aqm 'added .hglfs'
- $ hg log -r . -T '{rev}: {lfs_files % "{file}: {oid}\n"}\n'
+ $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n'
2: lfs.catchall: d4ec46c2869ba22eceb42a729377432052d9dd75d82fc40390ebaadecee87ee9
lfs.test: 5489e6ced8c36a7b267292bde9fd5242a5f80a7482e8f23fa0477393dfaa4d6c
@@ -997,7 +997,7 @@
$ echo '012345678901234567890a' > nolfs.exclude
$ echo '01234567890123456a' > lfs.catchall
$ hg ci -qm 'unmodified .hglfs'
- $ hg log -r . -T '{rev}: {lfs_files % "{file}: {oid}\n"}\n'
+ $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n'
3: lfs.catchall: 31f43b9c62b540126b0ad5884dc013d21a61c9329b77de1fceeae2fc58511573
lfs.test: 8acd23467967bc7b8cc5a280056589b0ba0b17ff21dbd88a7b6474d6290378a6
@@ -1008,7 +1008,7 @@
$ echo '012345678901234567890abc' > nolfs.exclude
$ echo '01234567890123456abc' > lfs.catchall
$ hg ci -qm 'file test' -X .hglfs
- $ hg log -r . -T '{rev}: {lfs_files % "{file}: {oid}\n"}\n'
+ $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n'
4: lfs.catchall: 6747cfb1b83965b4a884e7a6061813ae31e4122028bc6a88d2ac5e5f9e05c5af
lfs.test: 3f40b70c2294e91e0fa789ebcf73c5a1d1c7aef270f83e477e40cb0513237e8c
@@ -1018,7 +1018,7 @@
$ echo '012345678901234567890abcdef' > nolfs.exclude
$ echo '01234567890123456abcdef' > lfs.catchall
$ hg ci -qm 'file test'
- $ hg log -r . -T '{rev}: {lfs_files % "{file}: {oid}\n"}\n'
+ $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n'
5:
$ cd ..