bundle -r should be consistent with diff

Bug #57664 reported by Martin Pool
2
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned

Bug Description

"bzr bundle" produces what is basically an enhanced diff. One would tend to expect the commands work similarly, but they're quite different in how they handle -r.

'bzr diff -r -3' means "diff the third-last revision against the working tree"

'bzr bundle -r -3' means "give a bundle from the remembered parent branch up to revision -3".

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 57664] bundle -r should be consistent with diff

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
> Public bug reported:
>
> "bzr bundle" produces what is basically an enhanced diff. One would
> tend to expect the commands work similarly, but they're quite different
> in how they handle -r.

On the other hand, they have very different purposes. 'diff' is
typically used to remind yourself of the changes you have made, while
you're working.

'bundle' is used to present your committed changes to the world in a
form that can be merged directly. Following 'diff' behaviour would
typically produce bundles that couldn't be merged directly, because they
would lack necessary ancestor revisions.

That was my rationale for making 'bundle' different from 'diff'.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFE7xto0F+nu1YWqI0RAsU2AJ9VW0n5ezkLGAbA+sVBdNdilSYiagCcClt7
e3nNo2H4VzqQ+Q//JqJXSow=
=gdty
-----END PGP SIGNATURE-----

Revision history for this message
Matthieu Moy (matthieu-moy) wrote :

Would it be interesting to have "bzr diff --bundle" ?

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 57664] Re: bundle -r should be consistent with diff

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matthieu Moy wrote:
> Would it be interesting to have "bzr diff --bundle" ?

Hard to say. The reason why bundle has a different UI from diff is in
order to ensure that useful bundles are generated. Doing diff --bundle
seems likely to produce bundles that can't be merged. Do you think the
advantage of a familiar UI outweighs that?

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFFEuN80F+nu1YWqI0RApudAJ40Fy9e1AXSzQohYT48iJq8wnZ/5ACdH3UB
sLmTxavuBfh6VWa/Kufhh8M=
=KLiY
-----END PGP SIGNATURE-----

Revision history for this message
Aaron Bentley (abentley) wrote :

Because the purpose of bundles is merging, not reviewing uncommitted changes, it makes sense that it works differently from diff

Changed in bzr:
status: Unconfirmed → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.