Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBenjamin Saller <bcsaller@objectrealms.net>2007-08-16 10:41:43 (GMT)
committer Benjamin Saller <bcsaller@objectrealms.net>2007-08-16 10:41:43 (GMT)
commit029629e7c79bdaf33191a07f2769e37e93bcc7fb (patch)
tree8acc524e31d6bda20382cd3cafd07e82a4a2de6e /src
parent91c3eebfbe6aa586150d9405792f6e02fb34fa81 (diff)
also drop the uid on the checkout copy
Diffstat (limited to 'src')
-rw-r--r--src/olpc/datastore/datastore.py6
-rw-r--r--src/olpc/datastore/hg_backingstore.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/olpc/datastore/datastore.py b/src/olpc/datastore/datastore.py
index 1fde4c7..4ca13b6 100644
--- a/src/olpc/datastore/datastore.py
+++ b/src/olpc/datastore/datastore.py
@@ -213,9 +213,9 @@ class DataStore(dbus.service.Object):
@dbus.service.method(DS_DBUS_INTERFACE,
- in_signature='sss',
+ in_signature='sssss',
out_signature='a{sv}s')
- def checkout(self, uid, vid=None, mountpoint=None):
+ def checkout(self, uid, vid=None, mountpoint=None, target=None, dir=None):
"""Check out a revision of a document. Returns the properties
of that version and a filename with the contents of that
version. Generally calls to this should have the mountpoint
@@ -231,7 +231,7 @@ class DataStore(dbus.service.Object):
filename = content.filename
return props, filename
else:
- return mp.checkout(uid, vid)
+ return mp.checkout(uid, vid, target=target, dir=dir)
@dbus.service.method(DS_DBUS_INTERFACE,
in_signature='ssss',
diff --git a/src/olpc/datastore/hg_backingstore.py b/src/olpc/datastore/hg_backingstore.py
index 8d13c5f..78bd175 100644
--- a/src/olpc/datastore/hg_backingstore.py
+++ b/src/olpc/datastore/hg_backingstore.py
@@ -105,6 +105,7 @@ class FileRepo(repo.repository):
x = Xattr(source, NAMESPACE)
# attempt to resolve the revision number from the property
parent = x.get('revision')
+ expected_uid = x.get('uid')
if parent:
parent = int(parent) # from unicode
else:
@@ -172,6 +173,7 @@ class FileRepo(repo.repository):
# this is used to aid in parent chaining on commits
x = Xattr(target, NAMESPACE)
x['revision'] = rev
+ x['uid'] = path # this is from the repo where the names are uids
def remove(self, path):
"""Hard remove the whole version history of an object"""