From 380f41b9a4c631be95a64068eaf5f10781df5531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Mon, 14 Feb 2011 12:26:51 +0100 Subject: [PATCH] - avoid to create a _pull file when having a working copy (or the user runs in a dead end, since we don't support pull on pulled sources, what is actually another bug) --- osc/commandline.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osc/commandline.py b/osc/commandline.py index b35b7242..4e7378ab 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -6026,6 +6026,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. raise oscerr.WrongArgs('Please commit your local changes first!') # check if we need to update upstream_rev = p.latest_rev() + if not (p.isfrozen() or p.ispulled()): + raise oscerr.WrongArgs('osc pull makes only sense with a detached head, did you mean osc up?') if p.rev != upstream_rev: raise oscerr.WorkingCopyOutdated((p.absdir, p.rev, upstream_rev)) elif not p.islink():