/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 __init__.py

  • Committer: Jelmer Vernooij
  • Date: 2009-02-01 04:17:31 UTC
  • mto: (0.205.39 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20090201041731-wsotk7w67k43vp4n
Fix empty dpush case.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
        from bzrlib import urlutils
81
81
        from bzrlib.bzrdir import BzrDir
82
82
        from bzrlib.errors import BzrCommandError, NoWorkingTree
 
83
        from bzrlib.inventory import Inventory
 
84
        from bzrlib.revision import NULL_REVISION
83
85
        from bzrlib.trace import info
84
86
        from bzrlib.workingtree import WorkingTree
85
87
        from upgrade import update_workinginv_fileids
86
88
 
 
89
        def get_inv(wt, revid):
 
90
            if revid == NULL_REVISION:
 
91
                return Inventory()
 
92
            else:
 
93
                return wt.branch.repository.get_inventory(revid)
 
94
 
87
95
        if directory is None:
88
96
            directory = "."
89
97
        try:
124
132
                    source_wt.lock_write()
125
133
                    try:
126
134
                        update_workinginv_fileids(source_wt, 
127
 
                            source_wt.branch.repository.get_inventory(old_last_revid),
128
 
                            source_wt.branch.repository.get_inventory(new_last_revid))
 
135
                            get_inv(source_wt, old_last_revid), 
 
136
                            get_inv(source_wt, new_last_revid))
129
137
                    finally:
130
138
                        source_wt.unlock()
131
139
                else: