context: explicitly return a tuple
In the refactoring of removing localrepo.status,
2edb8648c500, we accidentally
changed the return type from a tuple to a list. Philosophically, this is
incorrect so we explicitly return a tuple again.
--- a/mercurial/context.py Tue May 27 19:21:12 2014 -0700
+++ b/mercurial/context.py Tue May 27 17:04:48 2014 -0500
@@ -326,7 +326,9 @@
for l in r:
l.sort()
- return r
+
+ # we return a tuple to signify that this list isn't changing
+ return tuple(r)
def makememctx(repo, parents, text, user, date, branch, files, store,
@@ -1446,8 +1448,9 @@
listunknown, listsubrepos)
# calling 'super' subtly reveresed the contexts, so we flip the results
# (s[1] is 'added' and s[2] is 'removed')
+ s = list(s)
s[1], s[2] = s[2], s[1]
- return s
+ return tuple(s)
class committablefilectx(basefilectx):
"""A committablefilectx provides common functionality for a file context