/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to contrib/bash/bzrbashprompt.sh

Fix python2.6 deprecation warnings related to hashlib.

* bzrlib/osutils.py: 
Wrap md5 and sha imports to be compatible with python 2.4, 2.5 and
above.  Replace all sha.new() calls by sha() calls they are
reputedly faster (not profiled).

* bzrlib/weave.py: 
Update sha import, fix use.     

* bzrlib/transport/http/_urllib2_wrappers.py: 
Update md5 and sha imports, fix use.    

* bzrlib/tests/test_testament.py:
Update sha import, fix use.     

* bzrlib/tests/test_knit.py:
Update sha import, fix use.     

* bzrlib/tests/test_hashcache.py: 
Update sha import, fix use.     

* bzrlib/tests/per_repository/test_check_reconcile.py:
Update sha import, fix use.     

* bzrlib/tests/http_utils.py: 
Update md5 and sha imports, fix use.    

* bzrlib/testament.py: 
Update sha import, fix use.     

* bzrlib/repofmt/pack_repo.py: 
Update md5 import, fix use.     

* bzrlib/hashcache.py: 
Update sha import, fix use.     

* bzrlib/btree_index.py: 
Delete useless sha import.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# modify PS1 to your preference and include this file in your bashrc
 
2
# or copy to /etc/bash_completions.d.
 
3
 
 
4
function __prompt_bzr()
 
5
{
 
6
        local revno nick;
 
7
        revno=$(bzr revno 2>/dev/null) || return
 
8
        nick=$(bzr nick 2>/dev/null) || return
 
9
        echo "[bzr://$revno@$nick]"
 
10
}
 
11
 
 
12
if [ "$PS1" ]; then
 
13
        PS1='\u@\h:$(__prompt_bzr)\W\$ '
 
14
fi