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

Proposed by Stefano Candori
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
bzr/__init__.py (+6/-3)
To merge this branch: bzr merge lp:~cando/zeitgeist-datasources/fix_bzr
Reviewer Review Type Date Requested Status
Manish Sinha (मनीष सिन्हा) Approve
Michal Hruby (community) Abstain
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

More metadata to uri

105. By Stefano Candori

Other metadata

106. By Stefano Candori

Less metadata :)

Revision history for this message
Michal Hruby (mhr3) wrote :

Looks good to me.

review: Approve
Revision history for this message
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
Revision history for this message
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.)

Revision history for this message
Stefano Candori (cando) wrote :

We should debate on Michal's doubts...

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

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

Less metadata :)

105. By Stefano Candori

Other metadata

104. By Stefano Candori

More metadata to uri

103. By Stefano Candori

Fix #695003

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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