~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge_directive.py

  • Committer: John Arbash Meinel
  • Date: 2008-10-30 00:55:00 UTC
  • mto: (3815.2.5 prepare-1.9)
  • mto: This revision was merged to the branch mainline in revision 3811.
  • Revision ID: john@arbash-meinel.com-20081030005500-r5cej1cxflqhs3io
Switch so that we are using a simple timestamp as the first action.

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
        else:
149
149
            revno = branch.get_revision_id_to_revno_map().get(self.revision_id,
150
150
                ['merge'])
151
 
        return '%s-%s' % (branch.nick, '.'.join(str(n) for n in revno))
 
151
        nick = re.sub('(\W+)', '-', branch.nick).strip('-')
 
152
        return '%s-%s' % (nick, '.'.join(str(n) for n in revno))
152
153
 
153
154
    @staticmethod
154
155
    def _generate_diff(repository, revision_id, ancestor_id):
209
210
                except errors.RevisionNotPresent:
210
211
                    # At least one dependency isn't present.  Try installing
211
212
                    # missing revisions from the submit branch
212
 
                    submit_branch = _mod_branch.Branch.open(self.target_branch)
 
213
                    try:
 
214
                        submit_branch = \
 
215
                            _mod_branch.Branch.open(self.target_branch)
 
216
                    except errors.NotBranchError:
 
217
                        raise errors.TargetNotBranch(self.target_branch)
213
218
                    missing_revisions = []
214
219
                    bundle_revisions = set(r.revision_id for r in
215
220
                                           info.real_revisions)