[Pkg-bazaar-commits] ./bzr/unstable r626: - add Store.copy_multi for use in pulling changes into a branch
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:18:49 UTC 2009
------------------------------------------------------------
revno: 626
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Mon 2005-06-06 21:37:20 +1000
message:
- add Store.copy_multi for use in pulling changes into a branch
modified:
bzrlib/store.py
-------------- next part --------------
=== modified file 'bzrlib/store.py'
--- a/bzrlib/store.py 2005-05-26 02:13:57 +0000
+++ b/bzrlib/store.py 2005-06-06 11:37:20 +0000
@@ -107,6 +107,19 @@
f.write(content)
f.close()
+ def copy_multi(self, other, ids):
+ """Copy texts for ids from other into self.
+
+ If an id is present in self, it is skipped. A count of copied
+ ids is returned, which may be less than len(ids).
+ """
+ count = 0
+ for id in ids:
+ if id in self:
+ continue
+ self.add(other[id], id)
+ count += 1
+ return count
def __contains__(self, fileid):
""""""
More information about the Pkg-bazaar-commits
mailing list