changeset 8242:aee8455ee8ec

Fix typeerror when specifying both --rebase and --pull
author Martijn Pieters <mj@zopatista.com>
date Wed, 29 Apr 2009 11:39:49 +0200
parents c8c231da59c3
children cb08c3765a02 965b11c1bd82
files hgext/rebase.py tests/test-rebase-pull tests/test-rebase-pull.out
diffstat 3 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Sun Apr 26 16:49:47 2009 -0500
+++ b/hgext/rebase.py	Wed Apr 29 11:39:49 2009 +0200
@@ -400,7 +400,7 @@
     'Call rebase after pull if the latter has been invoked with --rebase'
     if opts.get('rebase'):
         if opts.get('update'):
-            del opts.get['update']
+            del opts['update']
             ui.debug(_('--update and --rebase are not compatible, ignoring '
                                         'the update flag\n'))
 
--- a/tests/test-rebase-pull	Sun Apr 26 16:49:47 2009 -0500
+++ b/tests/test-rebase-pull	Wed Apr 29 11:39:49 2009 +0200
@@ -53,6 +53,10 @@
 hg glog --template '{rev}\n' -l 1
 
 echo
+echo "% pull --rebase --update should ignore --update"
+hg pull --rebase --update 2>&1 | sed 's/\(pulling from \).*/\1/'
+
+echo
 echo "% pull --rebase doesn't update if nothing has been pulled"
 hg up 1
 hg pull --rebase 2>&1 | sed 's/\(pulling from \).*/\1/'
--- a/tests/test-rebase-pull.out	Sun Apr 26 16:49:47 2009 -0500
+++ b/tests/test-rebase-pull.out	Wed Apr 29 11:39:49 2009 +0200
@@ -44,6 +44,11 @@
 @  2
 |
 
+% pull --rebase --update should ignore --update
+pulling from 
+searching for changes
+no changes found
+
 % pull --rebase doesn't update if nothing has been pulled
 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
 pulling from