~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge_directive.py

  • Committer: Lukáš Lalinský
  • Date: 2008-05-23 10:39:44 UTC
  • mto: This revision was merged to the branch mainline in revision 3477.
  • Revision ID: lalinsky@gmail.com-20080523103944-00kkkromakot9y9p
Sanitize branch nick before using it as an attachment filename in ``bzr send``

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):