From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 20 Jun 2006 20:09:45 +0400 From: "Alexey I. Froloff" To: ALT Devel discussion list Message-ID: <20060620160945.GW12268@hell.immo.ru> References: <20060620151921.GU12268@hell.immo.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E0IhBwMLbrMClE+H" Content-Disposition: inline In-Reply-To: <20060620151921.GU12268@hell.immo.ru> User-Agent: Mutt/1.5.11 Subject: Re: [devel] =?koi8-r?b?UTogLmdlYXItcnVsZXMgySAiwdDT1NLJzc7ZxSIg08/S?= =?koi8-r?b?w9kg1yDP1MTFzNjOz80gwtLBzt7F?= X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.7 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2006 16:09:46 -0000 Archived-At: List-Archive: List-Post: --E0IhBwMLbrMClE+H Content-Type: multipart/mixed; boundary="p609JBPwWeYlfsbE" Content-Disposition: inline --p609JBPwWeYlfsbE Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Alexey I. Froloff [060620 19:26]: > =F4=C1=CB=C9=CD =CF=C2=D2=C1=DA=CF=CD =D0=CF=CC=D5=DE=C1=C5=D4=D3=D1 =DE= =D4=CF =D5 =CE=C1=D3 "=D3=CB=C1=DE=C5=D4" $tree_id. =FC=D4=CF =D3=CF=D7=D3= =C5=CD > =C2=D2=C5=C4=CF=D7=C1=D1 =C9=C4=C5=D1 =C9=CC=C9 =CD=CF=D6=CE=CF =CE=C1=DE= =C9=CE=C1=D4=D8 =C7=CF=D4=CF=D7=C9=D4=D8 =D0=C1=D4=DE? ;-) =F0=C1=D4=DE =CE=C1 tar* =CF=CB=C1=DA=C1=CC=D3=D1 =D4=D2=C9=D7=C9=C1=CC=D8= =CE=D9=CD, =CE=CF =CE=C5 =CD=CF=C7=D5 =D0=D2=C9=C4=D5=CD=C1=D4=D8 =CF=D0=C9= =D3=C1=CE=C9=C5 =DC=D4=CF=CA =CF=D0=C3=C9=C9. =F5 diff* =D3=C9=CE=D4=C1=CB=D3=C9=D3 =C2=D5= =C4=C5=D4 =C1=CE=C1=CC=CF=C7=C9=DE=CE=D9=CA. =E1 =CD=CF=D6=CE=CF =CE=C5 =D0=CF=CC=D8=DA=CF=D7=C1=D4=D8=D3=D1 diff*, =C1 = =D0=C5=D2=C9=CF=C4=C9=DE=C5=D3=CB=C9 =D3=D7=C1=CC=C9=D7=C1=D4=D8 =D2=C5=DA=D5=CC=D8=D4=C1=D4=D9 git-format-patch =D7 =CF=D4=C4=C5=CC=D8=CE= =D9=CA =CB=C1=D4=C1=CC=CF=C7 (=D0=CF=D3=CC=C5 git-rebase) =C9 =DC=D4=C9 =D0=C1=D4=DE=C9 =CE=C1=CB=CC=C1=C4=D9=D7=C1=D4=D8= =D7 =D3=D0=C5=CB=C5. --=20 Regards, Sir Raorn. --p609JBPwWeYlfsbE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="gear-tar-branch.patch" Content-Transfer-Encoding: quoted-printable =46rom nobody Mon Sep 17 00:00:00 2001 =46rom: Sir Raorn Date: Tue, 20 Jun 2006 20:04:53 +0400 Subject: [PATCH] branch=3Dbranch_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 --- 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=3Darchive_name - tar archive na # base=3Dbase_name - when specified it is added as a leading path # to the files in the generated tar archive. # spec=3Dpath_to_file - path to specfile which defines keywords; +# branch=3Dbranch_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=3D' ' =20 + tar_tree=3D"$tree_id" + local opt quoted spec=3D spec_name=3D spec_version=3D spec_release=3D =20 for opt; do @@ -341,6 +344,9 @@ get_tar_name() ;; base=3D*) tar_base=3D"${opt#base=3D}" ;; + branch=3D*) + tar_tree=3D"${opt#branch=3D}" + ;; *) rules_error "Unrecognized option: $opt" ;; esac @@ -359,6 +365,7 @@ get_tar_name() subst_keywords tar_name "$dir" "$spec_name" "$spec_version" "$spec_releas= e" [ -z "$tar_base" -o "$tar_base" =3D ' ' ] || subst_keywords tar_base "$dir" "$spec_name" "$spec_version" "$spec_relea= se" + subst_keywords tar_tree "$dir" "$spec_name" "$spec_version" "$spec_releas= e" } =20 make_tar() @@ -374,16 +381,18 @@ make_tar() shift [ "$tar_base" !=3D ' ' ] || tar_base=3D"$name" + tar_tree=3D"$1" + shift =20 local id if [ "$dir" =3D . ]; then - id=3D"$tree_id" + id=3D"$tar_tree" else local dir_name base_name quoted dir_name=3D"$(dirname -- "$dir")" base_name=3D"$(basename -- "$dir")" # modifies $tree - traverse_tree "$tree_id" "$dir_name" || + traverse_tree "$tar_tree" "$dir_name" || return 0 quoted=3D"$(quote_sed_regexp "$base_name")" id=3D"$(git-ls-tree "$tree" "$base_name" | @@ -424,7 +433,7 @@ make_archive() check_path dirname "$dir_name" =20 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" } =20 copy_by_pattern() --=20 1.3.3 --p609JBPwWeYlfsbE-- --E0IhBwMLbrMClE+H Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFEmB3JVqT7+fkT8woRAgvCAKCqPuQXiepfhCDQ+R9+cqQo5cSr8ACgqYUm WDy01oV9Dy7PKIj0rB+ZF5c= =epZb -----END PGP SIGNATURE----- --E0IhBwMLbrMClE+H--