Merge lp:~wallyworld/goetveld/rietveld-no-bzr-diff-alias into lp:goetveld

Proposed by Ian Booth
Status: Merged
Merged at revision: 41
Proposed branch: lp:~wallyworld/goetveld/rietveld-no-bzr-diff-alias
Merge into: lp:goetveld
Diff against target: 12 lines (+1/-1)
1 file modified
bazaar.go (+1/-1)
To merge this branch: bzr merge lp:~wallyworld/goetveld/rietveld-no-bzr-diff-alias
Reviewer Review Type Date Requested Status
John A Meinel (community) Approve
Review via email: mp+135587@code.launchpad.net

Commit message

Add --no-alias to the bzr diff command used to get the branch changes to push to codereview.

Description of the change

Make bzr diff command work with aliases

I have bzr diff aliased to bzr cdiff so I can get nice coloured output. Sadly, this confuses the ability to parse the diff output to push patches to codereview.

This simple fix adds "--no-alias" to the bzr diff command to make everything work nicely.

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

LGTM

review: Approve
Revision history for this message
Ian Booth (wallyworld) wrote :

*** Submitted:

Make bzr diff command work with aliases

I have bzr diff aliased to bzr cdiff so I can get nice coloured output. Sadly, this confuses the ability to parse the diff output to push patches to codereview.

This simple fix adds "--no-alias" to the bzr diff command to make everything work nicely.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bazaar.go'
2--- bazaar.go 2012-03-15 02:02:17 +0000
3+++ bazaar.go 2012-11-22 05:50:22 +0000
4@@ -73,7 +73,7 @@
5
6 func (b *bzrBranches) Patch() (patch []*FileDiff, err error) {
7 revisions := fmt.Sprint("revid:", b.oldRevision, "..revid:", b.newRevision, "")
8- output, status, err := run("bzr", "diff", "-r", revisions, b.newPath)
9+ output, status, err := run("bzr", "--no-aliases", "diff", "-r", revisions, b.newPath)
10 // Status 1 just means there are changes.
11 if err != nil && status != 1 {
12 return nil, err

Subscribers

People subscribed via source and target branches