[jhbuild] [git] Switch branches previous to stash and pull



commit 7e53c01f67971014ee51fdeac772be086fc9771c
Author: Dirk Wallenstein <halsmit t-online de>
Date:   Mon May 17 10:51:11 2010 +0200

    [git] Switch branches previous to stash and pull
    
    Now the refusal of the previously extracted function to switch dirty
    branches will take effect. It is very unlikely that a user wants to
    apply uncommited changes onto another branch by means of a jhbuild
    update operation. Such an operation certainly deserves manual
    inspection.
    
    This will now update the new branch instead of the previous one.
    
    The problem with not finding recently added remote branches is solved in
    a previous commit.

 jhbuild/versioncontrol/git.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/versioncontrol/git.py b/jhbuild/versioncontrol/git.py
index ea35efd..d088aa4 100644
--- a/jhbuild/versioncontrol/git.py
+++ b/jhbuild/versioncontrol/git.py
@@ -358,6 +358,8 @@ class GitBranch(Branch):
         if update_mirror:
             self.update_dvcs_mirror(buildscript)
 
+        self._switch_branch_if_necessary(buildscript)
+
         stashed = False
         if self.is_dirty(ignore_submodules=True):
             stashed = True
@@ -375,8 +377,6 @@ class GitBranch(Branch):
             except CommandError:
                 raise CommandError(_('Failed to update module (corrupt .git?)'))
 
-        self._switch_branch_if_necessary(buildscript)
-
         if stashed:
             # git stash pop was introduced in 1.5.5, 
             if self._check_version_git('1.5.5'):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]