Zeitgeist Data-Sources

Merge lp:~cando/zeitgeist-datasources/fix_bzr into lp:zeitgeist-datasources/0.8

Proposed by Stefano Candori on 2011-01-05
Status: Needs review
Proposed branch: lp:~cando/zeitgeist-datasources/fix_bzr
Merge into: lp:zeitgeist-datasources/0.8
Diff against target: 35 lines (+6/-3) 1 file modified
To merge this branch: bzr merge lp:~cando/zeitgeist-datasources/fix_bzr
Reviewer Review Type Date Requested Status
Manish Sinha (मनीष सिन्हा) Approve on 2012-03-17
Michal Hruby 2011-01-05 Abstain on 2011-01-11
Review via email: mp+45253@code.launchpad.net

Description of the Change

In this branch i've fixed bug #695003.

To post a comment you must log in.
104. By Stefano Candori on 2011-01-05

More metadata to uri

105. By Stefano Candori on 2011-01-05

Other metadata

106. By Stefano Candori on 2011-01-05

Less metadata :)

Michal Hruby (mhr3) wrote :

Looks good to me.

review: Approve
Michal Hruby (mhr3) wrote :

On a second thought I really don't like that this is going to screw up popularity of the folder subject, it could use more discussion...

review: Abstain
Siegfried Gevatter (rainct) wrote :

What's the status of this? Looks good to me.

(By the way, it'd be nice to refactor code shared in post_commit & post_pull into a new method.)

Stefano Candori (cando) wrote :

We should debate on Michal's doubts...

If we add the commit number, then the advantages would outweigh the disadvantages (my 2 cents)

I would like to see this merged in the upcoming release (trying to get it out in a day or two)

review: Approve

Unmerged revisions

106. By Stefano Candori on 2011-01-05

Less metadata :)

105. By Stefano Candori on 2011-01-05

Other metadata

104. By Stefano Candori on 2011-01-05

More metadata to uri

103. By Stefano Candori on 2011-01-05

Fix #695003

Preview Diff

1=== modified file 'bzr/__init__.py'
2--- bzr/__init__.py 2010-11-01 16:32:39 +0000
3+++ bzr/__init__.py 2011-01-05 16:43:11 +0000
4@@ -17,7 +17,7 @@
5 # You should have received a copy of the GNU Lesser General Public License
6 # along with this program. If not, see <http://www.gnu.org/licenses/>.
7
8-"""Post-commit hook to submit the commit to Zeitgeist (http://www.zeitgeist-project.com)
9+"""Post-commit and post-pull hook to submit the commit to Zeitgeist (http://www.zeitgeist-project.com)
10
11 Requires bzr 0.15 or higher.
12
13@@ -63,8 +63,9 @@
14 _text += str(new_revno) + "\n"
15 _text += revision.message.rstrip()
16
17+ uri = master.base + "#revision=" + str(new_revno)
18 subject = Subject.new_for_values(
19- uri=unicode(master.base),
20+ uri=unicode(uri),
21 interpretation=unicode(Interpretation.FOLDER),
22 manifestation=unicode(Manifestation.FILE_DATA_OBJECT),
23 text=unicode(_text),
24@@ -88,8 +89,10 @@
25 _text += (" to revision ")
26 _text += str(master.revno())+":\n"
27 _text += revision.get_summary()
28+
29+ uri = master.base + "#revision=" + str(master.revno())
30 subject = Subject.new_for_values(
31- uri=unicode(master.base),
32+ uri=unicode(uri),
33 interpretation=unicode(Interpretation.FOLDER),
34 manifestation=unicode(Manifestation.FILE_DATA_OBJECT),
35 text=unicode(_text),

Subscribers

People subscribed via source and target branches