~ubuntu-branches/ubuntu/natty/bzr/natty-proposed

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_tags.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2010-08-07 00:54:52 UTC
  • mfrom: (1.4.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100807005452-g4zb99ezl3xn44r4
Tags: 2.2.0-1
* New upstream release.
 + Adds support for setting timestamps to originating revisions.
   Closes: #473450
 + Removes remaining string exception. Closes: #585193, LP: #586926
 + Add C extension to work around Python issue 1628205. LP: #583941,
   Closes: #577110
 + Avoids showing progress bars when --quiet is used. Closes: #542105,
   LP: #320035
 + No longer creates ~/.bazaar as root when run under sudo. LP: #376388
 + 'bzr commit' now supports -p as alternative for --show-diff. LP: #571467
 + 'bzr add' no longer adds .THIS/.BASE/.THEIRS files unless
   explicitly requested. LP: #322767
 + When parsing patch files, Bazaar now supports diff lines before each
   patch. LP: #502076
 + WorkingTrees now no longer requires using signal.signal, so can
   be used in a threaded environment. LP: #521989
 + An assertion error is no longer triggered when pushing to a pre-1.6
   Bazaar server. LP: #528041
* Bump standards version to 3.9.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
16
16
 
17
17
"""Tests for commands related to tags"""
18
18
 
19
 
from bzrlib import bzrdir
 
19
from bzrlib import (
 
20
    bzrdir,
 
21
    tag,
 
22
    )
20
23
from bzrlib.branch import (
21
24
    Branch,
22
25
    )
47
50
        self.assertContainsRe(err,
48
51
            "Tags can only be placed on a single revision")
49
52
 
 
53
    def test_no_tag_name(self):
 
54
        out, err = self.run_bzr('tag -d branch', retcode=3)
 
55
        self.assertContainsRe(err, 'Please specify a tag name.')
 
56
 
 
57
    def test_automatic_tag_name(self):
 
58
        def get_tag_name(branch, revid):
 
59
            return "mytag"
 
60
        Branch.hooks.install_named_hook('automatic_tag_name',
 
61
            get_tag_name, 'get tag name')
 
62
        out, err = self.run_bzr('tag -d branch')
 
63
        self.assertContainsRe(out, 'Created tag mytag.')
 
64
 
50
65
    def test_tag_current_rev(self):
51
66
        t = self.make_branch_and_tree('branch')
52
67
        t.commit(allow_pointless=True, message='initial commit',
73
88
        # ... but can if you use --force
74
89
        out, err = self.run_bzr('tag -d branch NEWTAG --force')
75
90
 
 
91
    def test_tag_delete_requires_name(self):
 
92
        out, err = self.run_bzr('tag -d branch', retcode=3)
 
93
        self.assertContainsRe(err, 'Please specify a tag name\\.')
 
94
 
76
95
    def test_branch_push_pull_merge_copies_tags(self):
77
96
        t = self.make_branch_and_tree('branch1')
78
97
        t.commit(allow_pointless=True, message='initial commit',