~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: John Arbash Meinel
  • Date: 2005-07-11 18:57:40 UTC
  • mto: (1185.11.1)
  • mto: This revision was merged to the branch mainline in revision 1396.
  • Revision ID: john@arbash-meinel.com-20050711185740-52d6e8ae144a9b87
Add pending_merge can take multiple entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1214
1214
        return p
1215
1215
 
1216
1216
 
1217
 
    def add_pending_merge(self, revision_id):
 
1217
    def add_pending_merge(self, *revision_ids):
1218
1218
        from bzrlib.revision import validate_revision_id
1219
1219
 
1220
 
        validate_revision_id(revision_id)
 
1220
        for rev_id in revision_ids:
 
1221
            validate_revision_id(rev_id)
1221
1222
 
1222
1223
        p = self.pending_merges()
1223
 
        if revision_id in p:
1224
 
            return
1225
 
        p.append(revision_id)
1226
 
        self.set_pending_merges(p)
1227
 
 
 
1224
        updated = False
 
1225
        for rev_id in revision_ids:
 
1226
            if rev_id in p:
 
1227
                continue
 
1228
            p.append(rev_id)
 
1229
            updated = True
 
1230
        if updated:
 
1231
            self.set_pending_merges(p)
1228
1232
 
1229
1233
    def set_pending_merges(self, rev_list):
1230
1234
        self.lock_write()