[Ffmpeg-devel] SVN dump

Michael Niedermayer michaelni
Sat Apr 28 22:02:35 CEST 2007


Hi

On Sat, Apr 28, 2007 at 11:37:09AM -0400, Daniel Serpell wrote:
> 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.

not really, your example is designed to look like its working
while it does not in the general case, what you do is just apply all the
changes you dont want in reverse its not forking the file at an old revission
see a realistic example below which fails fatally:

$hg an -nf file
10 file: line 1
10 file: line 2 updated
10 file: line 3
10 file: line 4 new

$hg up 9
1 files updated, 0 files merged, 0 files removed, 0 files unresolved

$hg an -nf file
7 file: line1
8 file: line2 updated
7 file: line3
9 file: line4 new

$hg cp file file9
$hg ci
$cp file9 tmpfile
$hg merge 10
merging file9 and file
1 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)

$mv tmpfile file9
$hg ci
$hg an -nf file9
12 file9: line1
12 file9: line2 updated
12 file9: line3
12 file9: line4 new

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070428/a10f2059/attachment.pgp>



More information about the ffmpeg-devel mailing list