diff options
Diffstat (limited to 'gbp')
-rwxr-xr-x | gbp/scripts/pull.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gbp/scripts/pull.py b/gbp/scripts/pull.py index 968f6093..6f58e837 100755 --- a/gbp/scripts/pull.py +++ b/gbp/scripts/pull.py @@ -1,6 +1,6 @@ # vim: set fileencoding=utf-8 : # -# (C) 2009,2013,2017 Guido Günther <agx@sigxcpu.org> +# (C) 2009,2013,2017,2018 Guido Günther <agx@sigxcpu.org> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -155,6 +155,15 @@ def main(argv): else: raise + (ret, out) = repo.is_clean() + if not ret: + gbp.log.err("You have uncommitted changes in your source tree:") + gbp.log.err(out) + raise GbpError + + repo.fetch(rem_repo, depth=options.depth) + repo.fetch(rem_repo, depth=options.depth, tags=True) + for branch in [options.debian_branch, options.upstream_branch]: if repo.has_branch(branch): branches.add(branch) @@ -175,14 +184,6 @@ def main(argv): if rem == fetch_remote and branch == rem_br: branches.add(branch) - (ret, out) = repo.is_clean() - if not ret: - gbp.log.err("You have uncommitted changes in your source tree:") - gbp.log.err(out) - raise GbpError - - repo.fetch(rem_repo, depth=options.depth) - repo.fetch(rem_repo, depth=options.depth, tags=True) for branch in branches: if not fast_forward_branch(rem_repo, branch, repo, options): retval = 2 |