Re: [fossil-users] Couple of newbie questions on artifacts and comparing

2013-01-08 Thread Stefan Bellon
On Tue, 08 Jan, Stephan Beal wrote:

> On Tue, Jan 8, 2013 at 3:49 PM, Stefan Bellon 
> wrote:
> 
> > Is subversion equally frowned upon? If not, what about:
> >
> >   fossil diff --from PREV --to HEAD myfile.c
> >
> 
> That would be too easy ;). Yes, it covers the most common case, but it
> would be much more interesting to be able to say "go back N
> versions", as such a feature implies the "prev" behaviour as well.

fossil diff --from -5 --to -3 myfile.c

it is, then. ;-)

-0 (or 0) being the current and positive (non-zero) values making no
sense (except when being run from inside the time machine shell).

> > The question is whether PREV and HEAD (and perhaps other symbolic
> > names) should be bound to one branch (i.e. the one of the current
> > checked out tree) or whether it should be global and possibly cross
> > branches.
> 
> That's a good point. My gut feeling is that the currently-checked-out
> branch "should" be used, defaulting to trunk if there is no checkout
> (that said, i think we once had a thread where the user had removed
> or renamed his trunk branch to something else). Or maybe a syntax like
> branch_name:symbolic_name (which of course only works as long as
> nobody uses ':' in their branch names).

No need for a new syntax (and a very non-fossil one), I think. "fossil
diff" already has the option --branch. Currently it is mutually
exclusive with --from and --to (because the revision hashes already
specify the branch), but that could be used to specify another branch
than the current one when using --from and --to with symbolic (or
commit-relative) names.

Greetings,
Stefan

-- 
Stefan Bellon
___
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of newbie questions on artifacts and comparing

2013-01-08 Thread Martin Gagnon
On Tue, Jan 08, 2013 at 03:56:15PM +0100, Stephan Beal wrote:
>On Tue, Jan 8, 2013 at 3:49 PM, Stefan Bellon  wrote:
> 
>  Is subversion equally frowned upon? If not, what about:
>fossil diff --from PREV --to HEAD myfile.c
> 
>That would be too easy ;). Yes, it covers the most common case, but it
>would be much more interesting to be able to say "go back N versions", as
>such a feature implies the "prev" behaviour as well.
> 
> 
>  The question is whether PREV and HEAD (and perhaps other symbolic names)
>  should be bound to one branch (i.e. the one of the current checked out
>  tree) or whether it should be global and possibly cross branches.
> 
>That's a good point. My gut feeling is that the currently-checked-out
>branch "should" be used, defaulting to trunk if there is no checkout (that
>said, i think we once had a thread where the user had removed or renamed
>his trunk branch to something else). Or maybe a syntax like
>branch_name:symbolic_name (which of course only works as long as nobody
>uses ':' in their branch names).

Actually, the "prev" keyword already does something.. 

Example:
$ fossil diff --from prev

   will give you diff between current checkout from previous version on
   repository.

   or 

$ fossil diff --from prev myfile.c

   Here, prev mean previous version globally, not previous version of
   the specified file...


This is not on the help, but I found this on the source..
http://fossil-scm.org/index.html/artifact/ab3b8161d773d9619a709c92ef33b799cc473a74?ln=49-72

-- 
Martin G.
___
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of newbie questions on artifacts and comparing

2013-01-08 Thread Richard Hipp
On Tue, Jan 8, 2013 at 9:49 AM, Stefan Bellon  wrote:

>
> Is subversion equally frowned upon? If not, what about:
>
>   fossil diff --from PREV --to HEAD myfile.c
>

Fossil already does this, with the exception that "PREV" is called "prev"
or "previous" and "HEAD" is called "current".

   fossil diff --from prev --to current myfile.c

When you say --to current, that means use the version of the file that is
checked in.  If you omit the --to current, that means use the version of
the file as editted in the check-out.

In place of "prev" and "current" you can also use "tip" to mean the latest
check-in.  Or you can put the name of any branch, and that means the latest
check-in on that branch.  Or you can do things like "branch:2012-09-16" to
mean the latest checkin on "branch" on or before 2012-09-16 00:00:00.  See
http://www.fossil-scm.org/fossil/doc/trunk/www/checkin_names.wiki for
additional information and for more examples.



-- 
D. Richard Hipp
[email protected]
___
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of newbie questions on artifacts and comparing

2013-01-08 Thread Stephan Beal
On Tue, Jan 8, 2013 at 3:49 PM, Stefan Bellon  wrote:

> Is subversion equally frowned upon? If not, what about:
>
>   fossil diff --from PREV --to HEAD myfile.c
>

That would be too easy ;). Yes, it covers the most common case, but it
would be much more interesting to be able to say "go back N versions", as
such a feature implies the "prev" behaviour as well.


> The question is whether PREV and HEAD (and perhaps other symbolic names)
> should be bound to one branch (i.e. the one of the current checked out
> tree) or whether it should be global and possibly cross branches.
>

That's a good point. My gut feeling is that the currently-checked-out
branch "should" be used, defaulting to trunk if there is no checkout (that
said, i think we once had a thread where the user had removed or renamed
his trunk branch to something else). Or maybe a syntax like
branch_name:symbolic_name (which of course only works as long as nobody
uses ':' in their branch names).


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of newbie questions on artifacts and comparing

2013-01-08 Thread Stefan Bellon
On Tue, 08 Jan, Stephan Beal wrote:

> On Tue, Jan 8, 2013 at 2:02 PM, Gilles  wrote:
> 
> > "fossil gdiff last beforelast myfile.c"
> 
> A similar request has come up several times, and is certainly
> something we should consider (this would affect commands other than
> diff, e.g. checkout could also use this). i'd be up for programming
> it if we (==the list) can agree on syntax/semantics and we don't have
> to support all of the 3 million options supported by git ("go up 2
> revs, sideways 14, then down another 2"). (That said, i'm probably
> exaggerating - i only briefly read about this feature in git.)

Is subversion equally frowned upon? If not, what about:

  fossil diff --from PREV --to HEAD myfile.c

In any case I think the --from and --to should be required and only
symbolic names for the revision hashes should be introduced.

The question is whether PREV and HEAD (and perhaps other symbolic names)
should be bound to one branch (i.e. the one of the current checked out
tree) or whether it should be global and possibly cross branches.

Greetings,
Stefan

-- 
Stefan Bellon
___
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of newbie questions on artifacts and comparing

2013-01-08 Thread Stephan Beal
On Tue, Jan 8, 2013 at 2:02 PM, Gilles  wrote:

> "fossil gdiff last beforelast myfile.c"
>

A similar request has come up several times, and is certainly something we
should consider (this would affect commands other than diff, e.g. checkout
could also use this). i'd be up for programming it if we (==the list) can
agree on syntax/semantics and we don't have to support all of the 3 million
options supported by git ("go up 2 revs, sideways 14, then down another
2"). (That said, i'm probably exaggerating - i only briefly read about this
feature in git.)

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of newbie questions on artifacts and comparing

2013-01-08 Thread Gilles
On Tue, 8 Jan 2013 13:43:22 +0100, Stefan Bellon
 wrote:
>> Next I tried the first artifact ID:
>> fossil gdiff --from 53ff5087e3 --to ad6f12df62
>> 
>> This works, but it seems to go through all the files that were part of
>> each commit.
>
>fossil diff --from 53ff5087e3 --to ad6f12df62 myfile.c

Thanks. I was under the wrong impression that the artifact ID was
enough to identify a specific revision of a specific file.

I would suggest adding the shortcuts to (g)diff:

"fossil gdiff last beforelast myfile.c"

Thank you.

___
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of newbie questions on artifacts and comparing

2013-01-08 Thread Gilles
On Tue, 8 Jan 2013 13:38:06 +0100, Stephan Beal
 wrote:
>> 2012-11-25 [ad6f12df62] New version (user: Joe,
>>artifact: [dc79071933], branch: trunk)
>> 2012-11-25 [53ff5087e3] Original file (user: Joe,
>>artifact: [54dff7fa29], branch: trunk)
>>
>Correct. It's not immediately obvious, but the first number is the commit
>UUID and the second is the file artifact itself:
>
>zOut = sqlite3_mprintf(
>   "[%.10s] %s (user: %s, artifact: [%.10s], branch: %s)",
>   zCiUuid, zCom, zUser, zFileUuid, zBr);

Thanks. If we must use the commit UUID when comparing different
revisions of a file, In which case do we need the file artifact ID
then?

___
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of newbie questions on artifacts and comparing

2013-01-08 Thread Stefan Bellon
On Tue, 08 Jan, Gilles wrote:

> Next I tried the first artifact ID:
> fossil gdiff --from 53ff5087e3 --to ad6f12df62
> 
> This works, but it seems to go through all the files that were part of
> each commit.

fossil diff --from 53ff5087e3 --to ad6f12df62 myfile.c

Greetings,
Stefan

-- 
Stefan Bellon
___
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of newbie questions on artifacts and comparing

2013-01-08 Thread Stephan Beal
On Tue, Jan 8, 2013 at 1:02 PM, Gilles  wrote:

> 2012-11-25 [ad6f12df62] New version (user: Joe,
>artifact: [dc79071933], branch: trunk)
> 2012-11-25 [53ff5087e3] Original file (user: Joe,
>artifact: [54dff7fa29], branch: trunk)
> ?
>
> In the output above, are "53ff5087e3" and "ad6f12df62" the artifact ID
> of the whole commit this file was part of, while "54dff7fa29" and
> "dc79071933" are the artifact ID of the two revisions of this
> particular file?
>

Correct. It's not immediately obvious, but the first number is the commit
UUID and the second is the file artifact itself:

zOut = sqlite3_mprintf(
   "[%.10s] %s (user: %s, artifact: [%.10s], branch: %s)",
   zCiUuid, zCom, zUser, zFileUuid, zBr);


> How can I get gdiff (WinMerge) to compare two revisions, usually the

last and before-last revisions?
>

If i'm interpreting the 'diff' help properly... try:

fossil gdiff --from 53ff5087e3 --to ad6f12df62 FILE1 ... FILEN

:-?

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users