Re: Diff between Branches

2009-10-31 Thread Colin Watson
On Sat, Oct 31, 2009 at 12:36:57PM +, Carles Pina i Estany wrote:
 I'm novice with Bazaar.
 I would like to diff between gettext branch and trunk. I did:
 
 bzr branch http://bzr.savannah.gnu.org/r/grub/people/robertmh/gettext/
 cd gettext
 bzr diff -r branch:http://bzr.savannah.gnu.org/r/ub/trunk/grub
 
 But I have some unexpected results like adding files and removing files
 that I would not expect: 
 
 === added file 'AUTHORS'
 --- AUTHORS 1970-01-01 00:00:00 +
 +++ AUTHORS 2009-10-31 12:19:08 +
 
 and then:
 === removed file 'AUTHORS'
 --- AUTHORS 2005-09-03 16:54:27 +
 +++ AUTHORS 1970-01-01 00:00:00 +

This usually means that there is a problem with the way the branches
were created or with the way they've been managed, such that the files
in each branch do not have common ancestry. (Bazaar assigns each file a
unique file-id in order to support good rename tracking, and will only
consider two files to be different versions of the same file if they
have the same file-id; you can see the file-id with e.g. 'bzr ls
--show-ids'.)

I haven't looked at these two branches to find out exactly what's
happened.

-- 
Colin Watson   [cjwat...@ubuntu.com]


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Diff between Branches

2009-10-31 Thread Robert Millan
On Sat, Oct 31, 2009 at 12:36:57PM +, Carles Pina i Estany wrote:
 
 Hi,
 
 I'm novice with Bazaar.
 I would like to diff between gettext branch and trunk. I did:
 
 bzr branch http://bzr.savannah.gnu.org/r/grub/people/robertmh/gettext/

The gettext branch was based on an old trunk, I've just regenerated it,
try branching again.

 bzr diff -r branch:http://bzr.savannah.gnu.org/r/ub/trunk/grub
 
 But I have some unexpected results like adding files and removing files
 that I would not expect: 

Is this what you wanted?

  bzr diff -r ancestor:bzr+ssh://bzr.savannah.gnu.org/grub/trunk/grub

Btw, if you're just trying to resync, it's better if you use bzr for that,
e.g.:

$ bzr pull bzr+ssh://bzr.savannah.gnu.org/grub/trunk/grub
bzr: ERROR: These branches have diverged. Use the missing command to see how.   

Use the merge command to reconcile them.
$ bzr merge bzr+ssh://bzr.savannah.gnu.org/grub/trunk/grub
[...]
Text conflict in conf/common.rmk
Text conflict in kern/misc.c
Text conflict in util/grub-mkconfig_lib.in
Text conflict in util/grub.d/00_header.in
Text conflict in util/grub.d/10_linux.in
5 conflicts encountered.

some manual work with conf/common.rmk and conf/common.rmk.*

$ bzr resolve conf/common.rmk

repeat untill all conflicts are resolved, then commit

After this is done, you can push to /people/your-dir/gettext or so.

-- 
Robert Millan

  The DRM opt-in fallacy: Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all.


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Diff between Branches

2009-10-31 Thread Robert Millan
On Sat, Oct 31, 2009 at 01:26:22PM +, Colin Watson wrote:
 
 This usually means that there is a problem with the way the branches
 were created or with the way they've been managed, such that the files
 in each branch do not have common ancestry.

I had to regenerate the commits one by one (fortunately there weren't many).

Do you know a more efficient way?

-- 
Robert Millan

  The DRM opt-in fallacy: Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all.


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Diff between Branches

2009-10-31 Thread Colin Watson
On Sat, Oct 31, 2009 at 02:45:49PM +0100, Robert Millan wrote:
 On Sat, Oct 31, 2009 at 01:26:22PM +, Colin Watson wrote:
  This usually means that there is a problem with the way the branches
  were created or with the way they've been managed, such that the files
  in each branch do not have common ancestry.
 
 I had to regenerate the commits one by one (fortunately there weren't many).
 
 Do you know a more efficient way?

It may be possible to use the 'bzr replay' command from the bzr-rebase
plugin. I don't use this often myself, but it seems like nominally the
right answer.

-- 
Colin Watson   [cjwat...@ubuntu.com]


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel