Merge lp://staging/~jameinel/goetveld/fix-log into lp://staging/goetveld

Proposed by John A Meinel
Status: Needs review
Proposed branch: lp://staging/~jameinel/goetveld/fix-log
Merge into: lp://staging/goetveld
Diff against target: 70 lines (+26/-24)
1 file modified
bazaar.go (+26/-24)
To merge this branch: bzr merge lp://staging/~jameinel/goetveld/fix-log
Reviewer Review Type Date Requested Status
The Go Language Gophers Pending
Review via email: mp+132060@code.staging.launchpad.net

Description of the change

Handle some edge cases with 'bzr log'

You can alias 'bzr log' to set default arguments. Because of this, the output
doesn't conform to what rietveld expects. This just forces specific flags so
that the output will match expectations.

https://codereview.appspot.com/6822053/

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

Reviewers: mp+132060_code.launchpad.net,

Message:
Please take a look.

Description:
Handle some edge cases with 'bzr log'

You can alias 'bzr log' to set default arguments. Because of this, the
output
doesn't conform to what rietveld expects. This just forces specific
flags so
that the output will match expectations.

https://code.launchpad.net/~jameinel/goetveld/fix-log/+merge/132060

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/6822053/

Affected files:
   A [revision details]
   M bazaar.go

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>

Index: bazaar.go
=== modified file 'bazaar.go'
--- bazaar.go 2012-03-15 02:02:17 +0000
+++ bazaar.go 2012-10-30 11:06:00 +0000
@@ -28,11 +28,11 @@
  // BazaarDiffBranches returns a Delta between the bazaar branch at
  // oldPath and the one at newPath.
  func BazaarDiffBranches(oldPath, newPath string) (Delta, error) {
- output1, _, err :=
run("bzr", "log", "-l1", "--show-ids", "-r", "ancestor:"+oldPath, newPath)
+ output1, _, err :=
run("bzr", "log", "--long", "-l1", "--show-ids", "-r", "ancestor:"+oldPath,
newPath)
   if err != nil {
    return nil, err
   }
- output2, _, err := run("bzr", "log", "-l1", "--show-ids", newPath)
+ output2, _, err :=
run("bzr", "log", "--long", "-l1", "--show-ids", "-r", "-1", newPath)
   if err != nil {
    return nil, err
   }

42. By John A Meinel

rietveld/bazaar: use 'bzr revision-info' instead of 'bzr log'

We don't need to deal with lots of flags to 'bzr log', instead use
'bzr revision-info' which just gives us the data we actually care
about.
Also, 'strings.Fields' is a simpler way to parse then doing
string searching for the right context.

Revision history for this message
John A Meinel (jameinel) wrote :
Revision history for this message
John A Meinel (jameinel) wrote :

Poke about getting a review on this?

Unmerged revisions

42. By John A Meinel

rietveld/bazaar: use 'bzr revision-info' instead of 'bzr log'

We don't need to deal with lots of flags to 'bzr log', instead use
'bzr revision-info' which just gives us the data we actually care
about.
Also, 'strings.Fields' is a simpler way to parse then doing
string searching for the right context.

41. By John A Meinel

Change the use of 'bzr log' to force the format.

If you have any aliases defined, then bzr log can actually use
a different format, and the bazaar code won't be able to determine
the actual revision id. (eg --short puts ' revision-id:revid' rather
than 'revision-id: revid'.)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches