]> git.pld-linux.org Git - packages/git-core-slug.git/commitdiff
- rel 5; work with packet-ref, too auto/th/git-core-slug-0.13.4-5
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 20 Nov 2014 12:20:53 +0000 (13:20 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 20 Nov 2014 12:20:53 +0000 (13:20 +0100)
git-core-slug-packet-ref.patch [new file with mode: 0644]
git-core-slug.spec

diff --git a/git-core-slug-packet-ref.patch b/git-core-slug-packet-ref.patch
new file mode 100644 (file)
index 0000000..7c6ca22
--- /dev/null
@@ -0,0 +1,25 @@
+--- a/git_slug/gitrepo.py.org  2014-11-20 12:53:31.342320473 +0100
++++ b/git_slug/gitrepo.py      2014-11-20 12:53:15.482453868 +0100
+@@ -82,12 +82,21 @@ class GitRepo:
+             'refs/notes/*:refs/notes/*'])
+     def check_remote(self, ref, remote=REMOTE_NAME):
++        localref = EMPTYSHA1
+         ref = ref.replace(REFFILE, os.path.join('remotes', remote))
+         try:
+             with open(os.path.join(self.gdir, ref), 'r') as f:
+                 localref = f.readline().strip()
+         except IOError:
+-            localref = EMPTYSHA1
++            try:
++                with open(os.path.join(self.gdir, 'packed-refs')) as f:
++                    for line in f:
++                        line_data = line.split()
++                        if len(line_data) == 2 and line_data[1] == ref:
++                            localref = line_data[0].strip()
++                            break
++            except IOError:
++                pass
+         return localref
+     def showfile(self, filename, ref="/".join([REMOTE_NAME, "master"])):
index 357ea4e1e0c66672f45748901dd4cd7cb4feba71..c574912a76883a56932c2bd360985bc6ea057805 100644 (file)
@@ -3,7 +3,7 @@ Summary:        Tools to interact with PLD git repositories
 Summary(pl.UTF-8):     Narzędzia do pracy z repozytoriami gita w PLD
 Name:          git-core-slug
 Version:       0.13.4
-Release:       4
+Release:       5
 License:       GPL v2
 Group:         Development/Building
 Source0:       https://github.com/draenog/slug/tarball/v%{version}/%{name}-%{version}.tar.gz
@@ -12,6 +12,7 @@ Source1:      slug_watch.init
 Source2:       crontab
 Source3:       slug_watch.sysconfig
 Source4:       slug_watch-cron
+Patch0:                %{name}-packet-ref.patch
 URL:           https://github.com/draenog/slug
 BuildRequires: asciidoc
 BuildRequires: docbook-dtd45-xml
@@ -52,6 +53,7 @@ do uruchamiania na serwerze gitolite PLD.
 %prep
 %setup -qc
 mv draenog-slug-*/* .
+%patch0 -p1
 
 %build
 %{__python3} setup.py build
This page took 0.075965 seconds and 4 git commands to generate.