# HG changeset patch # User Martijn Pieters <mj@zopatista.com> # Date 1240997989 -7200 # Wed Apr 29 11:39:49 2009 +0200 # Node ID aee8455ee8ec49d0e15a3154df625f5db559dc51 # Parent c8c231da59c36b8a19f86c090e2f9f450d7b7029 Fix typeerror when specifying both --rebase and --pull diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -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')) diff --git a/tests/test-rebase-pull b/tests/test-rebase-pull --- a/tests/test-rebase-pull +++ b/tests/test-rebase-pull @@ -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/' diff --git a/tests/test-rebase-pull.out b/tests/test-rebase-pull.out --- a/tests/test-rebase-pull.out +++ b/tests/test-rebase-pull.out @@ -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