Re: [fossil-users] diff with --from --to

2014-08-16 Thread Stephan Beal
On Fri, Aug 15, 2014 at 4:03 PM, to...@acm.org wrote:

   I suppose you’re referring to this comment:


Correct.


 Well, since the option was never available before, no one expects any
 specific behavior.


Fair enough. (i once submitted a patch to Apache Ant (way back when) which
fixed a NullPointerException. It was rejected because someone might rely
on the older [NPE] behaviour. Very strange, i thought.)



 Another suggestion: It could be added in a compatible way to the “–from
 without –to” behavior so that “–to branch” without “–from current” would
 behave differently from “—from current –to branch” but in a similar way as
 described above.

 So, if I understand correctly, an explicit “--from current --to branch”
 could be used to compare the committed “current”, whereas the “--to branch”
 without an explicit “--from current” would be used to compare the current
 check-out including local uncommitted changes.


As i rarely do cross-branch diffs (and then tend to use the html ui), i
don't quite feel qualified to agree or disagree with you :/. i'm hoping one
of the guys who uses these features more can provide some opinions or
details.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do. -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] diff with --from --to

2014-08-15 Thread Stephan Beal
On Thu, Aug 14, 2014 at 12:32 PM, Stephan Beal sgb...@googlemail.com
wrote:


 http://fossil-scm.org/index.html/info/d5a8940431ad8716a0168081086e07521bfb8b79

 (note: in the pending-review branch, as i'd like to be certain i'm not
 breaking something here)


@Tony: based on Richard's feedback, i'm going to close that branch. If you
have a strong argument for why usage consistency should win out here ;)
feel free to argue your points.


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do. -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] diff with --from --to

2014-08-15 Thread tonyp
I suppose you’re referring to this comment:

“Note that --from branch --to current and --from branch are not quite the 
same thing.  The second form (without the --to) does a diff between the branch 
and the code in the current check-out including local uncommitted changes.  
Adding the --to option does the diff from the branch to the pristine check-out 
before local changes are applied.

So adding --from current if the --from is missing might not be exactly what 
people expect.”

Well, since the option was never available before, no one expects any specific 
behavior.  The behavior can be defined now for the first time, either way 
giving preference to the current checkout with possible uncommitted changes 
(which is what I had in mind, not knowing that an explicit ‘--from current’ 
would mean without considering the uncommitted changes).

Another suggestion: It could be added in a compatible way to the “–from without 
–to” behavior so that “–to branch” without “–from current” would behave 
differently from “—from current –to branch” but in a similar way as described 
above.

So, if I understand correctly, an explicit “--from current --to branch” could 
be used to compare the committed “current”, whereas the “--to branch” without 
an explicit “--from current” would be used to compare the current check-out 
including local uncommitted changes.

To me, it simply feels redundant to type –from current, as it’s sort of implied 
when you just say –to branch.  I’ll leave it up to the majority to decide.
From: Stephan Beal 
Sent: Friday, August 15, 2014 3:37 PM
To: Fossil SCM user's discussion 
Subject: Re: [fossil-users] diff with --from --to

On Thu, Aug 14, 2014 at 12:32 PM, Stephan Beal sgb...@googlemail.com wrote:

  http://fossil-scm.org/index.html/info/d5a8940431ad8716a0168081086e07521bfb8b79


  (note: in the pending-review branch, as i'd like to be certain i'm not 
breaking something here)

@Tony: based on Richard's feedback, i'm going to close that branch. If you have 
a strong argument for why usage consistency should win out here ;) feel free to 
argue your points.


-- 

- stephan beal
http://wanderinghorse.net/home/stephan/ 
http://gplus.to/sgbeal
Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those 
who insist on a perfect world, freedom will have to do. -- Bigby Wolf



___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] diff with --from --to

2014-08-14 Thread Tony Papadimitriou
Just an idea:
f g somefile --to trunk
gives this error: “must use --from if --to is present”, while:
f g somefile --from trunk
f g somefile --from current --to trunk  (same as before but opposite direction)
both work just fine.  So, why not make the “--from current” the default when no 
--from option is found, instead of giving an error?
Thanks.___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] diff with --from --to

2014-08-14 Thread Stephan Beal
On Mon, Aug 11, 2014 at 10:40 PM, Tony Papadimitriou to...@acm.org wrote:

   f g somefile --from trunk
   f g somefile --from current --to trunk  (same as before but opposite
 direction)
 both work just fine.  So, why not make the “--from current” the default
 when no --from option is found, instead of giving an error?


But what kind of world would we live in without a little bit of senseless
inconsistency?

i am looking into your request now. Perhaps there's a reason it was done
that way, but nothing comes to mind.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do. -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] diff with --from --to

2014-08-14 Thread Richard Hipp
On Thu, Aug 14, 2014 at 6:32 AM, Stephan Beal sgb...@googlemail.com wrote:

 On Thu, Aug 14, 2014 at 12:16 PM, Stephan Beal sgb...@googlemail.com
 wrote:

 On Mon, Aug 11, 2014 at 10:40 PM, Tony Papadimitriou to...@acm.org
 wrote:

   f g somefile --from trunk
   f g somefile --from current --to trunk  (same as before but opposite
 direction)



Note that --from branch --to current and --from branch are not quite
the same thing.  The second form (without the --to) does a diff between the
branch and the code in the current check-out including local uncommitted
changes.  Adding the --to option does the diff from the branch to the
pristine check-out before local changes are applied.

So adding --from current if the --from is missing might not be exactly
what people expect.



   both work just fine.  So, why not make the “--from current” the default
 when no --from option is found, instead of giving an error?


 My interpretation is here...


 http://fossil-scm.org/index.html/info/d5a8940431ad8716a0168081086e07521bfb8b79

 (note: in the pending-review branch, as i'd like to be certain i'm not
 breaking something here)

 [stephan@host:~/cvs/fossil/fossil/src]$ f diff sqlite3.c --to prev --from
 current -c 1
 --- src/sqlite3.c
 +++ src/sqlite3.c
 @@ -30156,7 +30156,3 @@
if( osUnlink(zPath)==(-1) ){
 -if( errno==ENOENT
 -#if OS_VXWORKS
 -|| errno==0x380003
 -#endif
 -){
 +if( errno==ENOENT ){
rc = SQLITE_IOERR_DELETE_NOENT;

 [stephan@host:~/cvs/fossil/fossil/src]$ f diff sqlite3.c --to prev  -c 1
 --- src/sqlite3.c
 +++ src/sqlite3.c
 @@ -30156,7 +30156,3 @@
if( osUnlink(zPath)==(-1) ){
 -if( errno==ENOENT
 -#if OS_VXWORKS
 -|| errno==0x380003
 -#endif
 -){
 +if( errno==ENOENT ){
rc = SQLITE_IOERR_DELETE_NOENT;

 [stephan@host:~/cvs/fossil/fossil/src]$ f diff sqlite3.c --to prev --from
 prev  -c 1
 --to/--from are the same.
 [stephan@host:~/cvs/fossil/fossil/src]$ echo $?
 1

 (That last part i just added because it seemed to be missing.)


 --
 - stephan beal
 http://wanderinghorse.net/home/stephan/
 http://gplus.to/sgbeal
 Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
 those who insist on a perfect world, freedom will have to do. -- Bigby Wolf

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




-- 
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