On Wed, Jan 2, 2013 at 11:09 AM, Stefan Bellon <sbel...@sbellon.de> wrote:

> Hi,
>
> I'm trying to find the correct command line syntax to specify in order
> to query the diff of a file that has been renamed (and possibly
> modified) between "from" and "to". E.g. the following scenario:
>
>   $ echo "foobar" > file1.txt
>   $ fossil addremove
>   $ fossil commit -m "file1"
>   New_Version: $HASH1
>   $ mv file1.txt file2.txt
>   $ fossil rename file1.txt file2.txt
>   $ echo "wombat" >> file2.txt
>   $ fossil commit -m "file2"
>   New_Version: $HASH2
>
> Now I want to see the contextual diff between $HASH1 and $HASH2
> regarding the committed file. When doing
>
> ...
> I want to follow the patches of a specific file (even through renames)
> commit by commit. What's the correct way of doing it from the command
> line?
>

I don't think there is an easy way to do this.  The question has not come
up before.

You can, of course, extract the artifacts into temp files and then diff
them:

    fossil finfo -r $HASH1 file1.txt >temp1.txt
    fossil finfo -r $HASH2 file2.txt >temp2.txt
    fossil test-diff temp1.txt temp2.txt --tk

But there is no way, at present, to ask Fossil to diff a file in one
check-in against a different file in a different check-in, on the
command-line.

>From the web-interface, you can get a timeline graph of the history of a
file and click on any two versions of that graph to get a diff between the
two versions of the file.  Hmm...  except there is not currently a web-page
that tracks a file across renames.

OK, so you have identified several new feature requests.....


-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to