Rev 512: Avoid use of removed smart_add(). in file:///data/jelmer/bzr-gtk/trunk/

Jelmer Vernooij jelmer at samba.org
Sun Jun 29 19:30:26 BST 2008


At file:///data/jelmer/bzr-gtk/trunk/

------------------------------------------------------------
revno: 512
revision-id: jelmer at samba.org-20080629183025-bvskxzn2h28jc76f
parent: jelmer at samba.org-20080628154539-l5lkvs5qwuf2zx1m
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sun 2008-06-29 20:30:25 +0200
message:
  Avoid use of removed smart_add().
modified:
  olive/add.py                   add.py-20060721181724-0mfkrqwpsa09q1t3-1
  olive/menu.py                  menu.py-20060803101046-9idg5lu81o53za8y-1
=== modified file 'olive/add.py'
--- a/olive/add.py	2008-05-05 18:16:46 +0000
+++ b/olive/add.py	2008-06-29 18:30:25 +0000
@@ -69,20 +69,16 @@
                              _i18n('Please select a file from the list,\nor choose the other option.'))
                 return
             
-            fullpath = self.wt.abspath(os.path.join(self.wtpath, filename))
-            
             try:
-                bzrlib.add.smart_add([fullpath])
+                self.wt.add([filename])
             except errors.NotBranchError:
                 error_dialog(_i18n('Directory is not a branch'),
                              _i18n('You can perform this action only in a branch.'))
                 return
         elif radio_unknown.get_active():
             # Add unknown files recursively
-            fullpath = self.wt.abspath(self.wtpath)
-            
             try:
-                bzrlib.add.smart_add([fullpath], True)
+                self.wt.add(self.wt.unknowns())
             except errors.NotBranchError:
                 error_dialog(_i18n('Directory is not a branch'),
                              _i18n('You can perform this action only in a branch.'))

=== modified file 'olive/menu.py'
--- a/olive/menu.py	2008-05-05 18:18:08 +0000
+++ b/olive/menu.py	2008-06-29 18:30:25 +0000
@@ -179,7 +179,8 @@
                          _i18n('Please select a file from the list,\nor choose the other option.'))
             return
         
-        bzrlib.add.smart_add([os.path.join(directory, filename)])
+        wt, path = WorkingTree.open_containing(os.path.join(directory, filename))
+        wt.add([path])
     
     @show_bzr_error
     def annotate(self, action):




More information about the bazaar-commits mailing list