[FFmpeg-devel] [Ffmpeg-devel] SVN dump

Michael Niedermayer michaelni
Tue May 1 21:57:20 CEST 2007


Hi

On Sat, Apr 28, 2007 at 10:02:35PM +0200, Michael Niedermayer wrote:
> 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

[...]

with git:

$git diff
diff --git a/toast b/toast
index 4578d86..b475fab 100644
--- a/toast
+++ b/toast
@@ -1,3 +1,4 @@
-cheese
-bread
-ketchup
+ cheese
+ bread
+ ketchup
+

$git commit toast    
Created commit 2df418bc71b98f45afd47f8cf217057fc9a05ea4
 1 files changed, 4 insertions(+), 3 deletions(-)

$vim test
$git commit test  
Created commit af462f473e434e986710185037721ccd5d1764f7
 1 files changed, 1 insertions(+), 0 deletions(-)

$git branch last_good 932f82eedbc2e78541f9dfd7c62745259bb5016e
$git checkout last_good
Switched to branch "last_good"

$git cherry-pick af462f473e434e986710185037721ccd5d1764f7
 100% (1/1) done
Finished one cherry-pick.
Created commit 796b4498e44d62b48c4737fee866694cf1e81372
 1 files changed, 1 insertions(+), 0 deletions(-)

$git branch -m master dead_end
$git branch -m last_good master

$git annotate toast 
b9e0fe34        (Michael Niedermayer    2007-05-01 13:21:13 +0200       1)cheese
b9e0fe34        (Michael Niedermayer    2007-05-01 13:21:13 +0200       2)bread
fa9db9d4        (Michael Niedermayer    2007-05-01 20:41:17 +0200       3)ketchup

$git annotate test
b9e0fe34        (Michael Niedermayer    2007-05-01 13:21:13 +0200       1)line1
d705dcc3        (Michael Niedermayer    2007-05-01 13:31:00 +0200       2)line2 updated
9f7a97bf        (Michael Niedermayer    2007-05-01 13:34:33 +0200       3)line3
796b4498        (Michael Niedermayer    2007-05-01 20:46:56 +0200       4)line4 added

git checkout dead_end
Switched to branch "dead_end"

$git annotate toast 
2df418bc        (Michael Niedermayer    2007-05-01 20:46:34 +0200       1) cheese
2df418bc        (Michael Niedermayer    2007-05-01 20:46:34 +0200       2) bread
2df418bc        (Michael Niedermayer    2007-05-01 20:46:34 +0200       3) ketchup
2df418bc        (Michael Niedermayer    2007-05-01 20:46:34 +0200       4)

$git annotate test
b9e0fe34        (Michael Niedermayer    2007-05-01 13:21:13 +0200       1)line1
d705dcc3        (Michael Niedermayer    2007-05-01 13:31:00 +0200       2)line2 updated
9f7a97bf        (Michael Niedermayer    2007-05-01 13:34:33 +0200       3)line3
af462f47        (Michael Niedermayer    2007-05-01 20:46:56 +0200       4)line4 added

(above is somewhat edited as i did various irrelevant things in between)

as can be seen git properly merged the later change to "test" it didnt just
recommit it with a new date, also:
------------------
$git log
commit af462f473e434e986710185037721ccd5d1764f7
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Tue May 1 20:46:56 2007 +0200

    adding a 4th line

commit 2df418bc71b98f45afd47f8cf217057fc9a05ea4
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Tue May 1 20:46:34 2007 +0200

    bad change

commit 932f82eedbc2e78541f9dfd7c62745259bb5016e
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Tue May 1 20:42:33 2007 +0200

    typo
...

$git checkout master  
Switched to branch "master"
$git log          
commit 796b4498e44d62b48c4737fee866694cf1e81372
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Tue May 1 20:46:56 2007 +0200

    adding a 4th line

commit 932f82eedbc2e78541f9dfd7c62745259bb5016e
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Tue May 1 20:42:33 2007 +0200

    typo
...
--------------------

shows that the bad change is properly removed

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

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- 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/20070501/6a27e79e/attachment.pgp>



More information about the ffmpeg-devel mailing list