[PATCH] Avoid bzr aliases and plugins

View: New views
6 Messages — Rating Filter:   Alert me  

[PATCH] Avoid bzr aliases and plugins

by Rainer Müller-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The options --no-aliases and --no-plugins avoid problems when a user
defined custom aliases for commands or installed plugins changing the
output or behavior.
---
 vc/bzr.py |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/vc/bzr.py b/vc/bzr.py
index ff6c8da..70abfed 100644
--- a/vc/bzr.py
+++ b/vc/bzr.py
@@ -43,19 +43,19 @@ class Vc(_vc.CachedVc):
     }
 
     def commit_command(self, message):
-        return [self.CMD,"commit","-m",message]
+        return [self.CMD,"commit","--no-aliases","--no-plugins","-m",message]
     def diff_command(self):
-        return [self.CMD,"diff"]
+        return [self.CMD,"diff","--no-aliases","--no-plugins"]
     def update_command(self):
-        return [self.CMD,"pull"]
+        return [self.CMD,"pull","--no-aliases","--no-plugins"]
     def add_command(self, binary=0):
-        return [self.CMD,"add"]
+        return [self.CMD,"add","--no-aliases","--no-plugins"]
     def remove_command(self, force=0):
-        return [self.CMD,"rm"]
+        return [self.CMD,"rm","--no-aliases","--no-plugins"]
     def revert_command(self):
-        return [self.CMD,"revert"]
+        return [self.CMD,"revert","--no-aliases","--no-plugins"]
     def resolved_command(self):
-        return [self.CMD,"resolve"]
+        return [self.CMD,"resolve","--no-aliases","--no-plugins"]
     def get_working_directory(self, workdir):
         return self.root
 
--
1.6.3.3

_______________________________________________
meld-list mailing list
meld-list@...
http://mail.gnome.org/mailman/listinfo/meld-list

Re: [PATCH] Avoid bzr aliases and plugins

by Vincent Legoll :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jul 12, 2009 at 7:05 PM, Rainer Mueller<raimue@...> wrote:
> The options --no-aliases and --no-plugins avoid problems when a user
> defined custom aliases for commands or installed plugins changing the
> output or behavior.

Looks like --no-plugins appeared in 0.90 (31-Aug-2007) and --no-alias
was already there in 0.8 (29-Aug-2006)

This patch looks OK, any reason Rainer or I should not commit them ?

--
Vincent Legoll
_______________________________________________
meld-list mailing list
meld-list@...
http://mail.gnome.org/mailman/listinfo/meld-list

Re: [PATCH] Avoid bzr aliases and plugins

by Stephen Kennedy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> The options --no-aliases and --no-plugins avoid problems when a user
>> defined custom aliases for commands or installed plugins changing the
>> output or behavior.
>
> Looks like --no-plugins appeared in 0.90 (31-Aug-2007) and --no-alias
> was already there in 0.8 (29-Aug-2006)
>
> This patch looks OK, any reason Rainer or I should not commit them ?

Looks good. How about making self.CMD a list and moving the args there
instead of repeating them?

Stephen.
_______________________________________________
meld-list mailing list
meld-list@...
http://mail.gnome.org/mailman/listinfo/meld-list

Re: [PATCH] Avoid bzr aliases and plugins

by Rainer Müller-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2009-07-20 22:42 , Stephen Kennedy wrote:

>>> The options --no-aliases and --no-plugins avoid problems when a user
>>> defined custom aliases for commands or installed plugins changing the
>>> output or behavior.
>>
>> Looks like --no-plugins appeared in 0.90 (31-Aug-2007) and --no-alias
>> was already there in 0.8 (29-Aug-2006)
>>
>> This patch looks OK, any reason Rainer or I should not commit them ?
>
> Looks good. How about making self.CMD a list and moving the args there
> instead of repeating them?

Probably a good idea. I just wanted to be least intrusive and as all
other VC plugins also have CMD set as a string I didn't want to change that.

I will send another patch which specifies these arguments at a single place.

Rainer
_______________________________________________
meld-list mailing list
meld-list@...
http://mail.gnome.org/mailman/listinfo/meld-list

[PATCH] Avoid bzr aliases and plugins

by Rainer Müller-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The options --no-aliases and --no-plugins avoid problems when a user
defined custom aliases for commands or installed plugins changing the
output or behavior.
---
 vc/bzr.py |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/vc/bzr.py b/vc/bzr.py
index ff6c8da..e7c370d 100644
--- a/vc/bzr.py
+++ b/vc/bzr.py
@@ -29,6 +29,7 @@ import _vc
 class Vc(_vc.CachedVc):
 
     CMD = "bzr"
+    CMDARGS = ["--no-aliases", "--no-plugins"]
     NAME = "Bazaar-NG"
     VC_DIR = ".bzr"
     PATCH_INDEX_RE = "^=== modified file '(.*)'$"
@@ -43,27 +44,27 @@ class Vc(_vc.CachedVc):
     }
 
     def commit_command(self, message):
-        return [self.CMD,"commit","-m",message]
+        return [self.CMD] + self.CMDARGS + ["commit", "-m", message]
     def diff_command(self):
-        return [self.CMD,"diff"]
+        return [self.CMD] + self.CMDARGS + ["diff"]
     def update_command(self):
-        return [self.CMD,"pull"]
+        return [self.CMD] + self.CMDARGS + ["pull"]
     def add_command(self, binary=0):
-        return [self.CMD,"add"]
+        return [self.CMD] + self.CMDARGS + ["add"]
     def remove_command(self, force=0):
-        return [self.CMD,"rm"]
+        return [self.CMD] + self.CMDARGS + ["rm"]
     def revert_command(self):
-        return [self.CMD,"revert"]
+        return [self.CMD] + self.CMDARGS + ["revert"]
     def resolved_command(self):
-        return [self.CMD,"resolve"]
+        return [self.CMD] + self.CMDARGS + ["resolve"]
     def get_working_directory(self, workdir):
         return self.root
 
     def _lookup_tree_cache(self, rootdir):
-        branch_root = _vc.popen([self.CMD, "root", rootdir]).read().rstrip('\n')
+        branch_root = _vc.popen([self.CMD] + self.CMDARGS + ["root", rootdir]).read().rstrip('\n')
         while 1:
             try:
-                proc = _vc.popen([self.CMD, "status", branch_root])
+                proc = _vc.popen([self.CMD] + self.CMDARGS + ["status", branch_root])
                 entries = proc.read().split("\n")[:-1]
                 break
             except OSError, e:
--
1.6.3.3

_______________________________________________
meld-list mailing list
meld-list@...
http://mail.gnome.org/mailman/listinfo/meld-list

Re: [PATCH] Avoid bzr aliases and plugins

by Stephen Kennedy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, applied. Should be in the forthcoming release.

Stephen.

On Tue, Jul 21, 2009 at 2:29 PM, Rainer Mueller<raimue@...> wrote:
> The options --no-aliases and --no-plugins avoid problems when a user
> defined custom aliases for commands or installed plugins changing the
> output or behavior.
_______________________________________________
meld-list mailing list
meld-list@...
http://mail.gnome.org/mailman/listinfo/meld-list