[Ffmpeg-devel] SVN dump

Daniel Serpell dserpell
Sat Apr 28 17:37:09 CEST 2007


Hi!

El Sat, Apr 28, 2007 at 01:03:25PM +0200, Michael Niedermayer escribio:
> Hi
> 
> On Sat, Apr 28, 2007 at 03:19:10AM -0700, Trent Piepho wrote:
> > On Sat, 28 Apr 2007, Michael Niedermayer wrote:
> > > On Fri, Apr 27, 2007 at 11:17:19PM -0700, Trent Piepho wrote:
> > > > On Sat, 28 Apr 2007, Michael Niedermayer wrote:
> > > [...]
> > > > > what i would like (i of course dont know if that matches what nico wants)
> > > > > is that i can take revision X of file Y and copy that to a new file or
> > > > > replace the head version of the old file by it, and that
> > > > > annotate/log will show the true history that is without the revissions
> > > > > which are not part of that branch or alternatively clearly seperate the
> > > > > revissions which arent part of the file
> > > >
> > > > I'm not sure I understand what you're trying to do.
> > > >
> > > > The hg update command updates the entire working directory to a given
> > > > revision (default is to the head aka tip revision).  Mercurial
> > > > isn't like CVS where one file can be at revision X and another file
> > > > at revision Y.
> > > >
> > > > If you run 'hg update 1234', and then do a 'hg commit', the new changeset
> > > > you commit will have rev 1234 as it's parent.  If 1234 isn't the tip, then
> > > > you will create a new branch.
> > >
> > > i know all that, what i tried was
> > > hg update 123
> > > hg cp fileA fileB
> > > hg ci fileB
> > > (hg up isnt possible here)
> > > hg merge 125 will update fileB to 125 of fileA which is plain wrong as fileB
> > > does not have a rev 125 differing from 123
> > 
> > hg copy doesn't do what one might expect, read this:
> > http://hgbook.red-bean.com/hgbookch5.html#x9-920005.3
> > 
> > hg update 123
> > cp fileA fileB
> > hg add fileB
> > hg commit -m "Added fileB"
> > hg merge 125
> > hg commit -m "merged with 125"
> > 
> > fileA will be updated to version 125, while fileB will remain as a copy of
> > what fileA was at revision 123.
> 
> this doesnt work
> $hg an testfile 
> 7: line1
> 8: line2 changed
> 7: line3
> $cp testfile testfile-copy
> $hg add testfile-copy
> $hg ci testfile-copy
> $hg an testfile-copy
> 10: line1
> 10: line2 changed
> 10: line3
> 
> this is not a copy of the revission but a new checkin its totally useless
> 
> $hg merge 9
> 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> (branch merge, don't forget to commit)
> $hg ci 
> $hg an testfile-copy
> 10: line1
> 10: line2 changed
> 10: line3
> 
> still obviously no change its still broken

Reading the manpage, you should do "hg an -f" to see the real history,
I tried the following:

$ hg an file
0: line1
2: line2 added
0: line3
4: line4 changed
1: line5
$ hg up 2
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg an file
0: line1
2: line2 added
0: line3
1: line4
1: line5
$ hg cp file file3
$ hg ci
$ cp file3 tempfile  # temporary copy of file3
$ hg merge
$ mv tempfile file3  # this undoes the bad merge
$ hg ci

Now, if you browse the history with "hg view", the correct
actions are shown. But, as you remarked:

$ hg an file
0: line1
2: line2 added
0: line3
4: line4 changed
1: line5
$ hg an file3
6: line1
6: line2 added
6: line3
6: line4
6: line5

Annotate missed the real history, because it don't follow
copies/renames. You can see the real history with:

$ hg an -nf file3
0  file: line1
2  file: line2 added
0  file: line3
6 file3: line4
1  file: line5

This is what you expected.

   Daniel.





More information about the ffmpeg-devel mailing list