[Pkg-bazaar-commits] ./bzr-gtk/unstable r518: Merge removal of smart_add.

Jelmer Vernooij jelmer at samba.org
Fri Apr 10 07:50:37 UTC 2009


------------------------------------------------------------
revno: 518
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2008-06-30 00:34:21 +0200
message:
  Merge removal of smart_add.
modified:
  NEWS
  olive/add.py
  olive/menu.py
    ------------------------------------------------------------
    revno: 511.4.1
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Sun 2008-06-29 20:31:29 +0200
    message:
      Fix use of smart_add.
    modified:
      NEWS
      olive/menu.py
    ------------------------------------------------------------
    revno: 511.4.2
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Sun 2008-06-29 20:32:05 +0200
    message:
      Fix another use of smart_add.
    modified:
      NEWS
      olive/add.py
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2008-06-29 22:32:59 +0000
+++ b/NEWS	2008-06-29 22:34:21 +0000
@@ -16,6 +16,8 @@
 
   * Fix import in olive. (Jelmer Vernooij, #223935)
 
+  * Avoid use of removed smart_add. (Jelmer Vernooij, #244025, #244027)
+
  CHANGES
 
   * Moved notify icon code to separate script. (Jelmer Vernooij)

=== modified file 'olive/add.py'
--- a/olive/add.py	2008-05-05 18:16:46 +0000
+++ b/olive/add.py	2008-06-29 18:32:05 +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:31:29 +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 Pkg-bazaar-commits mailing list