Re: [fossil-users] Problem with: fossil revert -r xxx

2017-05-13 Thread Ron Aaron

  
  
On 11/05/2017 16:14, Richard Hipp wrote:


  On 5/10/17, Ron Aaron  wrote:

  
I tried to revert to a good revision 'xxx' using "fossil revert -r xxx"

Despite the help stating "Revert all files if no file name is provided",
instead fossil told me, "the --revision option does not work for the
entire tree".

  
  
Amid all the confusion, I'm not sure this question was ever answered.
So let me now try...

The "fossil revert" command is intended to undo edits to the local
check-out and restore the content of files back to the last committed
version.  For example, you start making some change and decide that
your idea isn't really working out, so you type "fossil revert" to
take you back to a pristine state.  Or you do "fossil revert
$filename" to undo all of the local edits for a particular file while
retaining the edits to other files.

The "fossil revert" command only affects the local check-out.  It
makes no changes to the repository.

If you want to move your whole check-out to a different baseline,
better to do so using:

 fossil revert
 fossil update $newbaseline

If you want to change a single file to be the same as it was several
check-ins ago, better to do something like this:

My desire was to have the effect of "merge --backout"
  of all the revisions back to a given one.  Perhaps it would be
  possible to add "merge --backout-all" or something similar, to
  have that effect?


  

___
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] Problem with: fossil revert -r xxx

2017-05-11 Thread Scott Robison
I'm on the road and may not be thinking clearly, but if you're trying
to revert your entire tree to the state 6 or 7 commits ago, might it
be easier to update to the commit you want, rename the first commit in
the now unwanted branch, and continue on from the new root?
-- 
Scott Robison
___
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] Problem with: fossil revert -r xxx

2017-05-11 Thread Artur Shepilko
>
> But in my experience, fossil revert is a rarely used command.
>

Both `fossil revert afile -r ver` and `fossil update ver afile` seem
to be a synonymous way to fetch a file's revision. HOWEVER, there's an
important distinction, `fossil update` would __merge-in uncommitted
changes__ with the requested revision, while `fossil revert` would
not -- it would just fetch the requested revision.

`fossil revert` allows you to back up from some messed up changes to a
given file without the need to commit related changes to other files.
I find this use-case fairly practical. `fossil stash` could be used
for this as well, yet revert seems more straightforward.
___
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] Problem with: fossil revert -r xxx

2017-05-11 Thread Warren Young
On May 11, 2017, at 5:03 AM, Richard Hipp  wrote:
> 
> On 5/11/17, Ross Berteig  wrote:
>> On 5/10/2017 8:54 PM, Ron Aaron wrote:
>>> 
>>> I tried to revert to a good revision 'xxx' using "fossil revert -r xxx"
>> 
>> But in my experience, fossil revert is a rarely used command.
> 
> Yeah.  In fact, I didn't even remember that there was a 'revert'
> command.  And even now, I'm not entirely clear what it does, or what
> it is intended to do.

I think it’s there to make Subversion transplants like me happy.

In my current 1000-command Bash command history, I’ve run some variant on 
“fossil revert” 4 times, and other Fossil commands 240 times.  That makes 
“revert” 1.67% of my recent Fossil commands.

It’s not the best sampling method, but it is enough to make “fossil revert” a 
significant command in my world.

As to when I use it, it’s mostly the next level beyond the use cases where you 
use “stash”: that is, you want to revert the current changes without even 
saving them, other than in the undo buffer.  I use it whenever I’ve done 
something entirely unwanted and need to get back to the prior checkin.

When you’re typing prose, do you ever just backspace over a mistyped word and 
retype it rather than edit it in place?  “fossil revert” is like that for me 
with code.

An example from the past week is that I accidentally said “fossil add” on a 
file through a symlink that is not itself checked in, so that on checkout you’d 
get a real directory in place of the symlink because Fossil is storing the file 
with the path as given on the command line, not fully dereferenced to canonical 
form.  I noticed this error during “fossil checkin”, so I aborted the checkin 
comment editor, reverted the change, and re-added the file under the correct 
name.

It may be relevant that I’m of the “check in early and often” school, so that 
“fossil revert” rarely throws away more than an hour of work, and often much 
less.
___
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] Problem with: fossil revert -r xxx

2017-05-11 Thread Andy Bradford
Thus said Ross Berteig on Wed, 10 May 2017 21:35:12 -0700:

> But in my experience, fossil revert is a rarely used command.

I use revert quite frequently to abandon changes I don't want anymore.

I don't often use it with -r though.

Andy
-- 
TAI64 timestamp: 400059146dec


___
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] Problem with: fossil revert -r xxx

2017-05-11 Thread Martin Gagnon
On Thu, May 11, 2017 at 09:14:43AM -0400, Richard Hipp wrote:
> On 5/10/17, Ron Aaron  wrote:
> > I tried to revert to a good revision 'xxx' using "fossil revert -r xxx"
> >
> > Despite the help stating "Revert all files if no file name is provided",
> > instead fossil told me, "the --revision option does not work for the
> > entire tree".
> 
> Amid all the confusion, I'm not sure this question was ever answered.
> So let me now try...
> 
> The "fossil revert" command is intended to undo edits to the local
> check-out and restore the content of files back to the last committed
> version.  For example, you start making some change and decide that
> your idea isn't really working out, so you type "fossil revert" to
> take you back to a pristine state.  Or you do "fossil revert
> $filename" to undo all of the local edits for a particular file while
> retaining the edits to other files.
> 
> The "fossil revert" command only affects the local check-out.  It
> makes no changes to the repository.
> 
> If you want to move your whole check-out to a different baseline,
> better to do so using:
> 
>  fossil revert
>  fossil update $newbaseline

Which is equivalent to:

 $ fossil co --force $newbaseline


For what I've understand from the Ron situation, I believe he needs to
revert to a previous version in trunk (6 or 7 commits ago in his case)
and continue development from there. 

That's what I've suggest on my previous post.  Exactly the same as what
you suggest above + a "checkin edit" on the web ui to move all the
checkins following the $newbaseline in another branch.

> 
> If you want to change a single file to be the same as it was several
> check-ins ago, better to do something like this:
> 
>  fossil artifact $hash >$filename

If you don't want to use the hash of the file, but the checkin hash (or
a tag name), the following will also works: 

 $ fossil revert $filename
 $ fossil up $newbaseline $filename

And may look more natural for people that are not used to do stdout
redirection to file.


my 2 cents...

Regards, 

-- 
Martin G.
___
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] Problem with: fossil revert -r xxx

2017-05-11 Thread Richard Hipp
On 5/10/17, Ron Aaron  wrote:
> I tried to revert to a good revision 'xxx' using "fossil revert -r xxx"
>
> Despite the help stating "Revert all files if no file name is provided",
> instead fossil told me, "the --revision option does not work for the
> entire tree".

Amid all the confusion, I'm not sure this question was ever answered.
So let me now try...

The "fossil revert" command is intended to undo edits to the local
check-out and restore the content of files back to the last committed
version.  For example, you start making some change and decide that
your idea isn't really working out, so you type "fossil revert" to
take you back to a pristine state.  Or you do "fossil revert
$filename" to undo all of the local edits for a particular file while
retaining the edits to other files.

The "fossil revert" command only affects the local check-out.  It
makes no changes to the repository.

If you want to move your whole check-out to a different baseline,
better to do so using:

 fossil revert
 fossil update $newbaseline

If you want to change a single file to be the same as it was several
check-ins ago, better to do something like this:

 fossil artifact $hash >$filename

In other words, look up the cryptographic hash for the version of the
file you want, then just overwrite the local copy with this historical
copy.

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


Re: [fossil-users] Problem with: fossil revert -r xxx

2017-05-11 Thread Doug Franklin

On 2017-05-11 7:03, Richard Hipp wrote:


Yeah.  In fact, I didn't even remember that there was a 'revert'
command.  And even now, I'm not entirely clear what it does, or what
it is intended to do.


I use it a few times a year when I thoroughly mess up a file or two 
locally and need to go back to the version in the repos.  I could delete 
the file and "fossil update", but "fossil rev $filename" is one stop 
shopping.


--
Doug "Lefty" Franklin
NutDriver Racing
http://NutDriver.org
Facebook: NutDriver Racing
Sponsored by Murphy
___
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] Problem with: fossil revert -r xxx

2017-05-11 Thread Tony Papadimitriou
Hmm, I happen to use the REVERT command *all* the time.  It's the simplest 
(and possibly only direct) way I know to quickly abort all changes (after 
experimenting with code) and go back to what was the check-in.  How do the 
rest of you do an abort?


I must admit I very rarely used the -r option, though.  But I have certainly 
needed a quicker way to backout multiple check-ins in one go (if this was 
supported), rather than one at a time.


-Original Message- 
From: Richard Hipp

Sent: Thursday, May 11, 2017 2:03 PM
To: Fossil SCM user's discussion
Subject: Re: [fossil-users] Problem with: fossil revert -r xxx

On 5/11/17, Ross Berteig <r...@cheshireeng.com> wrote:

On 5/10/2017 8:54 PM, Ron Aaron wrote:


I tried to revert to a good revision 'xxx' using "fossil revert -r xxx"


But in my experience, fossil revert is a rarely used command.



Yeah.  In fact, I didn't even remember that there was a 'revert'
command.  And even now, I'm not entirely clear what it does, or what
it is intended to do.

The original "revert" command was added on 2007-09-24 (very early in
Fossil's history) by user "jnc" - I'm not sure who that is.

I have just now checked in a change to moves the "revert" command off
of the "fossil help" menu, so that you now only see it when you do
"fossil help --all".

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


___
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] Problem with: fossil revert -r xxx

2017-05-11 Thread Martin Gagnon
On Thu, May 11, 2017 at 12:17:44PM +0300, Ron Aaron wrote:
> Sorry, but I can't see how the terminology "... all files if no file
> name is provided" could mean anything but what I assumed.
> 
> It may not be used often, but in the event were one has decided, as I
> did, that a certain number of trunk changes (as in: the last 7) need to
> be reverted, it is what one would expect to be able to use.  That is,
> "revert not just one file, but all files, to a given revision".
> 
> Yes, I can "upd XXX" to get back to XXX.  But since I want the continued
> development to be from there on, but I don't want to branch, I have two
> options if 'revert' doesn't work:
> 
>  1. Do "merge --backout" in reverse order for each of the N revisions I
> want to remove, or
>  2. Do "upd XXX" and then "ci --allow-fork", than "upd trunk" and "merge
> that-branch" and then close that-branch
> 
> Neither is nearly as simple and intuitive as "revert".
> 
> No, I didn't want to update to that revision, I wanted to replace the
> tip with that revision.


In that case, it mean that all changes following XXX needs to become a
new branch that would will abandon or continue development later. This
happens often to me, here what I do normally:

   1. fossil co --force XXX  
(or "fossil up XXX" if you want to keep uncommited changes)

   2.  Edit the checkin following XXX (using fossil ui) and use "make
   this checkin the start of a new branch:", This way XXX will
   become the new tip of trunk.

I found this better than having revert to do what you want, because here
we know what's happens by looking the timeline.

If the commits following XXX was really a mistake, you can just name
this branch "mistake" and you can optionally hide it.


Regards,

-- 
Martin G.
___
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] Problem with: fossil revert -r xxx

2017-05-11 Thread Richard Hipp
On 5/11/17, Ross Berteig  wrote:
> On 5/10/2017 8:54 PM, Ron Aaron wrote:
>>
>> I tried to revert to a good revision 'xxx' using "fossil revert -r xxx"
>
> But in my experience, fossil revert is a rarely used command.
>

Yeah.  In fact, I didn't even remember that there was a 'revert'
command.  And even now, I'm not entirely clear what it does, or what
it is intended to do.

The original "revert" command was added on 2007-09-24 (very early in
Fossil's history) by user "jnc" - I'm not sure who that is.

I have just now checked in a change to moves the "revert" command off
of the "fossil help" menu, so that you now only see it when you do
"fossil help --all".

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


Re: [fossil-users] Problem with: fossil revert -r xxx

2017-05-11 Thread Ron Aaron
Sorry, but I can't see how the terminology "... all files if no file
name is provided" could mean anything but what I assumed.

It may not be used often, but in the event were one has decided, as I
did, that a certain number of trunk changes (as in: the last 7) need to
be reverted, it is what one would expect to be able to use.  That is,
"revert not just one file, but all files, to a given revision".

Yes, I can "upd XXX" to get back to XXX.  But since I want the continued
development to be from there on, but I don't want to branch, I have two
options if 'revert' doesn't work:

 1. Do "merge --backout" in reverse order for each of the N revisions I
want to remove, or
 2. Do "upd XXX" and then "ci --allow-fork", than "upd trunk" and "merge
that-branch" and then close that-branch

Neither is nearly as simple and intuitive as "revert".

No, I didn't want to update to that revision, I wanted to replace the
tip with that revision.



On 05/11/17 07:35, Ross Berteig wrote:
> On 5/10/2017 8:54 PM, Ron Aaron wrote:
>>
>> I tried to revert to a good revision 'xxx' using "fossil revert -r xxx"
>>
>> Despite the help stating "Revert all files if no file name is
>> provided", instead fossil told me, "the --revision option does not
>> work for the entire tree".
>>
>
> The help also says "-r REVISION revert given FILE(s) back to given
> REVISION", which strongly implies that it can only be used with a
> single file at a time.
>
> But in my experience, fossil revert is a rarely used command.
>
> Each file it reverts is edited in the current workspace to have the
> content it did at that version. Those edits are usually changes that
> would subsequently need to be committed. The only time they are not,
> is when the revision xxx is the same version as the workspace itself;
> thus editing the file to put it back before you accidentally broke it
> with some other command.
>
> This often does make sense when you merge from the wrong branch by
> mistake or need to repair damage caused to a file by local uncommitted
> changes.
>
> But I've rarely used it.
>
> Is it possible you really wanted "fossil update xxx" instead?
>
> That would make all the changed needed on disk to move the current
> working copy to revision xxx. It isn't an edit. You simply have a
> check out at that revision level. This is a command that is frequently
> used to hop between trunk and branches, or to go back to a version
> that has a bug report to reproduce it locally in exactly the version
> the reporter has.
>


*Ron Aaron | * CTO Aaron High-Tech, Ltd  | +1
425.296.0766 / +972 52.652.5543 | GnuPG Key: 91F92EB8

<>___
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] Problem with: fossil revert -r xxx

2017-05-10 Thread Ross Berteig

On 5/10/2017 8:54 PM, Ron Aaron wrote:


I tried to revert to a good revision 'xxx' using "fossil revert -r xxx"

Despite the help stating "Revert all files if no file name is 
provided", instead fossil told me, "the --revision option does not 
work for the entire tree".




The help also says "-r REVISION revert given FILE(s) back to given 
REVISION", which strongly implies that it can only be used with a single 
file at a time.


But in my experience, fossil revert is a rarely used command.

Each file it reverts is edited in the current workspace to have the 
content it did at that version. Those edits are usually changes that 
would subsequently need to be committed. The only time they are not, is 
when the revision xxx is the same version as the workspace itself; thus 
editing the file to put it back before you accidentally broke it with 
some other command.


This often does make sense when you merge from the wrong branch by 
mistake or need to repair damage caused to a file by local uncommitted 
changes.


But I've rarely used it.

Is it possible you really wanted "fossil update xxx" instead?

That would make all the changed needed on disk to move the current 
working copy to revision xxx. It isn't an edit. You simply have a check 
out at that revision level. This is a command that is frequently used to 
hop between trunk and branches, or to go back to a version that has a 
bug report to reproduce it locally in exactly the version the reporter has.


--
Ross Berteig   r...@cheshireeng.com
Cheshire Engineering Corp.   http://www.CheshireEng.com/
+1 626 303 1602

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


[fossil-users] Problem with: fossil revert -r xxx

2017-05-10 Thread Ron Aaron
I tried to revert to a good revision 'xxx' using "fossil revert -r xxx"

Despite the help stating "Revert all files if no file name is provided",
instead fossil told me, "the --revision option does not work for the
entire tree".

This is with fossil 2.2 [81d7d3f43e] 2017-04-11 20:54:55 UTC



*Ron Aaron | * CTO Aaron High-Tech, Ltd  | +1
425.296.0766 / +972 52.652.5543 | GnuPG Key: 91F92EB8

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