From: "Alexey I. Froloff" <raorn@immo.ru>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] Q: .gear-rules и "апстримные" сорцы в отдельном бранче
Date: Tue, 20 Jun 2006 20:09:45 +0400
Message-ID: <20060620160945.GW12268@hell.immo.ru> (raw)
In-Reply-To: <20060620151921.GU12268@hell.immo.ru>
[-- Attachment #1.1: Type: text/plain, Size: 477 bytes --]
* Alexey I. Froloff <raorn@> [060620 19:26]:
> Таким образом получается что у нас "скачет" $tree_id. Это совсем
> бредовая идея или можно начинать готовить патч? ;-)
Патч на tar* оказался тривиальным, но не могу придумать описание
этой опции. У diff* синтаксис будет аналогичный.
А можно не пользоваться diff*, а периодически сваливать
результаты git-format-patch в отдельный каталог (после
git-rebase) и эти патчи накладывать в спеке.
--
Regards,
Sir Raorn.
[-- Attachment #1.2: gear-tar-branch.patch --]
[-- Type: text/plain, Size: 2611 bytes --]
From nobody Mon Sep 17 00:00:00 2001
From: Sir Raorn <raorn@altlinux.ru>
Date: Tue, 20 Jun 2006 20:04:53 +0400
Subject: [PATCH] branch=branch_name parameter for tar command.
With this option it is possible to keep unmodified upstream
sources in another branch with help of git-cvsimport, git-svn,
git-svnimport, git-pull and so on.
Signed-off-by: Sir Raorn <raorn@altlinux.ru>
---
gear | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
65871a4ac82d1fde66d3d2a724ce460334bf3504
diff --git a/gear b/gear
index b113ce4..063e152 100755
--- a/gear
+++ b/gear
@@ -38,6 +38,7 @@ # name=archive_name - tar archive na
# base=base_name - when specified it is added as a leading path
# to the files in the generated tar archive.
# spec=path_to_file - path to specfile which defines keywords;
+# branch=branch_name - when specified sets [WRITEME]
# Valid tar keywords are:
# @dir@ - basename(path_to_directory);
# @name@, @version@, @release@.
@@ -330,6 +331,8 @@ get_tar_name()
# Special non-empty marker.
tar_base=' '
+ tar_tree="$tree_id"
+
local opt quoted spec= spec_name= spec_version= spec_release=
for opt; do
@@ -341,6 +344,9 @@ get_tar_name()
;;
base=*) tar_base="${opt#base=}"
;;
+ branch=*)
+ tar_tree="${opt#branch=}"
+ ;;
*) rules_error "Unrecognized option: $opt"
;;
esac
@@ -359,6 +365,7 @@ get_tar_name()
subst_keywords tar_name "$dir" "$spec_name" "$spec_version" "$spec_release"
[ -z "$tar_base" -o "$tar_base" = ' ' ] ||
subst_keywords tar_base "$dir" "$spec_name" "$spec_version" "$spec_release"
+ subst_keywords tar_tree "$dir" "$spec_name" "$spec_version" "$spec_release"
}
make_tar()
@@ -374,16 +381,18 @@ make_tar()
shift
[ "$tar_base" != ' ' ] ||
tar_base="$name"
+ tar_tree="$1"
+ shift
local id
if [ "$dir" = . ]; then
- id="$tree_id"
+ id="$tar_tree"
else
local dir_name base_name quoted
dir_name="$(dirname -- "$dir")"
base_name="$(basename -- "$dir")"
# modifies $tree
- traverse_tree "$tree_id" "$dir_name" ||
+ traverse_tree "$tar_tree" "$dir_name" ||
return 0
quoted="$(quote_sed_regexp "$base_name")"
id="$(git-ls-tree "$tree" "$base_name" |
@@ -424,7 +433,7 @@ make_archive()
check_path dirname "$dir_name"
get_tar_name "$(basename -- "$dir_name")" "$@"
- make_tar "$cmd" "$dir_name" "$tar_name" "$tar_base"
+ make_tar "$cmd" "$dir_name" "$tar_name" "$tar_base" "$tar_tree"
}
copy_by_pattern()
--
1.3.3
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-06-20 16:09 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-20 15:19 Alexey I. Froloff
2006-06-20 16:09 ` Alexey I. Froloff [this message]
2006-06-20 17:00 ` Alexey I. Froloff
2006-06-21 6:27 ` Anton Farygin
2006-06-22 3:49 ` Dmitry V. Levin
2006-06-22 6:36 ` Anton Farygin
2006-06-22 6:40 ` Dmitry V. Levin
2006-06-22 7:37 ` Anton Farygin
2006-06-22 7:40 ` Dmitry V. Levin
2006-06-22 8:01 ` Anton Farygin
2006-06-22 8:16 ` Alexey I. Froloff
2006-06-22 8:23 ` Dmitry V. Levin
2006-06-22 7:32 ` Anton Gorlov
2006-06-22 7:37 ` Dmitry V. Levin
2006-06-22 7:45 ` Anton Gorlov
2006-06-22 10:01 ` [devel] Q: .gear-rules и " апстримные " " Nick S. Grechukh
2006-06-22 10:26 ` Anton Gorlov
2006-06-22 7:47 ` [devel] Q: .gear-rules и "апстримные" " Anton Farygin
2006-06-22 7:48 ` Kirill A. Shutemov
2006-06-22 7:57 ` Dmitry V. Levin
2006-06-22 8:06 ` Anton Gorlov
2006-06-22 8:20 ` Kirill Maslinsky
2006-06-22 8:21 ` Dmitry V. Levin
2006-06-22 8:31 ` Anton Gorlov
2006-06-22 8:14 ` Alexey I. Froloff
2006-06-22 8:26 ` Dmitry V. Levin
2006-06-22 8:53 ` Kirill A. Shutemov
2006-06-22 10:05 ` Dmitry V. Levin
2006-06-22 10:24 ` Anton Farygin
2006-06-22 9:10 ` Alexey I. Froloff
2006-06-22 11:20 ` Dmitry V. Levin
2006-06-22 14:56 ` Alexey I. Froloff
2006-06-22 18:20 ` Dmitry V. Levin
2006-06-29 15:37 ` Alexey I. Froloff
2006-06-24 4:22 ` Alexey Tourbin
2006-06-24 12:40 ` Dmitry V. Levin
2006-06-24 21:59 ` Alexey Tourbin
2006-06-24 22:26 ` Dmitry V. Levin
2006-06-25 0:57 ` Alexey Tourbin
2006-06-25 11:00 ` Dmitry V. Levin
2006-06-25 7:16 ` Q: .gear-rules É "ÁÐÓÔÒÉÍÎÙÅ" ÓÏÒÃÙ × ÏÔÄÅÌØÎÏÍ ÂÒÁÎÞÅ Andrey Khavryuchenko
2006-06-25 10:50 ` [devel] Q: .gear-rules и "апстримные" сорцы в отдельном бранче Dmitry V. Levin
2006-06-25 11:09 ` Q: .gear-rules É "ÁÐÓÔÒÉÍÎÙÅ" ÓÏÒÃÙ × ÏÔÄÅÌØÎÏÍ ÂÒÁÎÞÅ Andrey Khavryuchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060620160945.GW12268@hell.immo.ru \
--to=raorn@immo.ru \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git