From b0047305954d1c0c34befbbb384c6d8b0d2f8cc7 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Thu, 21 May 2015 15:09:21 +0400 Subject: [PATCH 1/3] uproject update fait fetch puis merge, manuellement --- lib/ulib/vcs | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/lib/ulib/vcs b/lib/ulib/vcs index 79cbad9..9e7ccd0 100644 --- a/lib/ulib/vcs +++ b/lib/ulib/vcs @@ -451,26 +451,42 @@ function git_update() { return 1 } - git pull "$@" || return - if [ -n "$autoff" ]; then - local orig_branch restore_branch rbranch - local -a branches - git_check_cleancheckout || return 0 - orig_branch="$(git_get_branch)" - array_from_lines branches "$(git_list_branches)" - for branch in "${branches[@]}"; do - remote="$(git_get_branch_remote "$branch")" - rbranch="$(git_get_branch_rbranch "$branch" "$remote")" - [ -n "$remote" -a -n "$rbranch" ] || continue + if [ -z "$autoff" ]; then + git pull "$@" + return $? + fi + + local orig_branch restore_branch remote rbranch pbranch + local -a branches + + git fetch -p "$@" || return + + git_check_cleancheckout || return 0 + orig_branch="$(git_get_branch)" + array_from_lines branches "$(git_list_branches)" + for branch in "${branches[@]}"; do + remote="$(git_get_branch_remote "$branch")" + rbranch="$(git_get_branch_rbranch "$branch" "$remote")" + pbranch="${rbranch#refs/remotes/}" + [ -n "$remote" -a -n "$rbranch" ] || continue + if git_is_ancestor "$branch" "$rbranch"; then if git_should_ff "$branch" "$rbranch"; then - echo "Fast-forwarding $branch..." + echo "* Fast-forwarding $branch -> $pbranch" git checkout -q "$branch" git merge -q --ff-only "$rbranch" restore_branch=1 fi - done - [ -n "$restore_branch" ] && git checkout -q "$orig_branch" - fi + else + if [ "$branch" == "$orig_branch" ]; then + echo "* Cannot fast-forward CURRENT branch $branch from $pbranch +Try to merge manually with: git merge $pbranch" + else + echo "* Cannot fast-forward local branch $branch from $pbranch +You can merge manually with: git checkout $branch; git merge $pbranch" + fi + fi + done + [ -n "$restore_branch" ] && git checkout -q "$orig_branch" return 0 } function git_push() { From 755cfa774261a328109d9409149a5b5322451425 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Fri, 22 May 2015 11:41:06 +0400 Subject: [PATCH 2/3] =?UTF-8?q?ne=20pas=20afficher=20les=20erreurs=20pour?= =?UTF-8?q?=20les=20fonctions=20de=20compl=C3=A9tion=20de=20git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/completion.d/ptools | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/completion.d/ptools b/lib/completion.d/ptools index 085c636..85bf02d 100644 --- a/lib/completion.d/ptools +++ b/lib/completion.d/ptools @@ -3,8 +3,8 @@ function __pdev_branches() { local prefix=origin/ { - git for-each-ref refs/heads/ --format='%(refname:short)' - git for-each-ref "refs/remotes/$prefix" --format='%(refname:short)' | grep -F "$prefix" | cut -c $((${#prefix} + 1))- + git for-each-ref refs/heads/ --format='%(refname:short)' 2>/dev/null + git for-each-ref "refs/remotes/$prefix" --format='%(refname:short)' 2>/dev/null | grep -F "$prefix" | cut -c $((${#prefix} + 1))- } | LANG=C sort -u | grep -vF HEAD | grep -vF master | @@ -12,6 +12,6 @@ function __pdev_branches() { grep -v '^hotfix-' } function __prel_branches() { - git for-each-ref --format='%(refname:short)' refs/heads | + git for-each-ref --format='%(refname:short)' refs/heads 2>/dev/null | grep -E '^(master$|release-)' } From 3def4cdc9dffbfaf37668b5e43bdf46435c1dd6e Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Fri, 22 May 2015 11:41:37 +0400 Subject: [PATCH 3/3] Init changelog & version 1.11.0 --- CHANGES.txt | 7 +++++++ VERSION.txt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index cba4985..fe93949 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,10 @@ +## Version 1.11.0 du 22/05/2015-11:41 + +2984052 Intégration de la branche quiet-completion +755cfa7 ne pas afficher les erreurs pour les fonctions de complétion de git +2b5eb2a Intégration de la branche pu +b004730 uproject update fait fetch puis merge, manuellement + ## Version 1.10.0 du 20/05/2015-12:08 bf1d86a Intégration de la branche pu-auto-forward diff --git a/VERSION.txt b/VERSION.txt index 81c871d..1cac385 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -1.10.0 +1.11.0