~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_inv.py

  • Committer: John Arbash Meinel
  • Date: 2010-02-17 17:11:16 UTC
  • mfrom: (4797.2.17 2.1)
  • mto: (4797.2.18 2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: john@arbash-meinel.com-20100217171116-h7t9223ystbnx5h8
merge bzr.2.1 in preparation for NEWS entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2008, 2009 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
18
18
from bzrlib import (
19
19
    chk_map,
20
20
    groupcompress,
 
21
    bzrdir,
21
22
    errors,
22
23
    inventory,
23
24
    osutils,
606
607
 
607
608
    def test_dir_detect_changes(self):
608
609
        left = inventory.InventoryDirectory('123', 'hello.c', ROOT_ID)
 
610
        left.text_sha1 = 123
 
611
        left.executable = True
 
612
        left.symlink_target='foo'
609
613
        right = inventory.InventoryDirectory('123', 'hello.c', ROOT_ID)
 
614
        right.text_sha1 = 321
 
615
        right.symlink_target='bar'
610
616
        self.assertEqual((False, False), left.detect_changes(right))
611
617
        self.assertEqual((False, False), right.detect_changes(left))
612
618
 
626
632
 
627
633
    def test_symlink_detect_changes(self):
628
634
        left = inventory.InventoryLink('123', 'hello.c', ROOT_ID)
 
635
        left.text_sha1 = 123
 
636
        left.executable = True
629
637
        left.symlink_target='foo'
630
638
        right = inventory.InventoryLink('123', 'hello.c', ROOT_ID)
 
639
        right.text_sha1 = 321
631
640
        right.symlink_target='foo'
632
641
        self.assertEqual((False, False), left.detect_changes(right))
633
642
        self.assertEqual((False, False), right.detect_changes(left))