Re: [Monotone-devel] undoing commits

2019-08-05 Thread Hendrik Boom
On Mon, Aug 05, 2019 at 03:56:02AM -0700, J Decker wrote:
> I'm sure it's way late now... but isn't ist just `mtn revert` ?

Just checked the documentation:  mtn revert undoes changes made to the 
workspace.
It does not undo the most recent commit.  So this is not what I want.  I just 
want 
the branch cert removed.

-- hendrik


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] undoing commits

2019-08-05 Thread Hendrik Boom
On Mon, Aug 05, 2019 at 03:56:02AM -0700, J Decker wrote:
> I'm sure it's way late now...

No, it's not too late.  I'm plannint to actually do this stuff 
later today.

> but isn't ist just `mtn revert` ?

Might be.  Ill look it up now I know what word to look for.

Can you do mtn revert twice to do two uncommits (neither 
has ever been synced).

-- hendrik

> 
> On Mon, Aug 5, 2019 at 3:48 AM Ludovic Brenta 
> wrote:
> 
> > Le 2019-08-05 02:21, Hendrik Boom a écrit :
> > > But if were to remove the branch certs (using the first instruction),
> > > is there also a way to install branch certs for the new branch?
> >
> > mtn approve rev [--branch=branchname] [--[no-]update]
> >
> >  This command puts rev on the branch branchname (defaults to the
> > workspace branch).
> >
> >  This command is a synonym for mtn cert rev branch branchname.
> >
> > --
> > Ludovic Brenta.
> >
> > ___
> > Monotone-devel mailing list
> > Monotone-devel@nongnu.org
> > https://lists.nongnu.org/mailman/listinfo/monotone-devel
> >

> ___
> Monotone-devel mailing list
> Monotone-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/monotone-devel


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] undoing commits

2019-08-05 Thread J Decker
I'm sure it's way late now... but isn't ist just `mtn revert` ?

On Mon, Aug 5, 2019 at 3:48 AM Ludovic Brenta 
wrote:

> Le 2019-08-05 02:21, Hendrik Boom a écrit :
> > But if were to remove the branch certs (using the first instruction),
> > is there also a way to install branch certs for the new branch?
>
> mtn approve rev [--branch=branchname] [--[no-]update]
>
>  This command puts rev on the branch branchname (defaults to the
> workspace branch).
>
>  This command is a synonym for mtn cert rev branch branchname.
>
> --
> Ludovic Brenta.
>
> ___
> Monotone-devel mailing list
> Monotone-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/monotone-devel
>
___
Monotone-devel mailing list
Monotone-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] undoing commits

2019-08-05 Thread Ludovic Brenta

Le 2019-08-05 02:21, Hendrik Boom a écrit :

But if were to remove the branch certs (using the first instruction),
is there also a way to install branch certs for the new branch?


mtn approve rev [--branch=branchname] [--[no-]update]

This command puts rev on the branch branchname (defaults to the 
workspace branch).


This command is a synonym for mtn cert rev branch branchname.

--
Ludovic Brenta.

___
Monotone-devel mailing list
Monotone-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] undoing commits

2019-08-04 Thread Hendrik Boom
On Mon, Aug 05, 2019 at 12:00:26AM +0200, Ludovic Brenta wrote:
> Le 2019-08-04 23:45, Hendrik Boom a écrit :
> > I committed two revisions on the main branch of development that should
> > have been made on a new branch. (just to be awkward, some of those
> > edits should have been made on the main branch and others not.  Each
> > revision is a mixed bag)
> > 
> > How can I recover?
> > 
> > Isn't there some way to remove recent commits as long as they haven't
> > sync'd to any other data base?
> > 
> > Because I checked the copy of the data base on the server, and they
> > don't
> > seem to have gotten there yet.
> > 
> > So maybe I can check out the recent committed revisions (elsewhere, as
> > backups), revert those commits, and then hand-edit the changes back
> > that should have been on the main branch, subsequently start a new
> > branch, and then and edit the new-branch changes back onto the new
> > branch.
> > 
> > Does this sound practical?  Anyone have a better idea?  Or an obvious
> > gotcha?
> > 
> > My alternative would seem to be more drastic: delete the local database
> > altogether, copy an old version of it from the server, and try to
> > recover from there.
> 
> I would use SQL commands to delete the branch certs on the two offending
> revisions.  This would prevent them from being synced to other databases.
> Of course, prior to doing that, revert any working trees to an ancestor
> revision.

Following up from your suggestion and trying to figure out how to use 
sql for this, I found two commands:

mtn local kill_certs selector certname [certval] 

and

mtn local kill_revision id 

This second one looks like what I was asking for.  I'd still have to 
back up the files in a few previous revisions so as to identify changes 
and apply them selectively (probably by hand) to the main and new 
branches.

But if were to remove the branch certs (using the first instruction),
is there also a way to install branch certs for the new branch?  This 
would seem to be the simple way to set up the new branch properly.
Of course I'd still have to go over the differences line by line to copy 
selected changes to the main branch.

Of course there's a way to install new branch certs, or at least the 
equivalent.  set up the new branch, then mtn propagate from the main to 
the new branches.  *Then remove certs from the wrong commits on the main 
branch.  Would be nice to have something more direct, that just attaches 
a sert, but this would work.  There would be fewer junk revisions left 
lying around.

-- hendrik


> 
> -- 
> Ludovic Brenta.
> 
> ___
> Monotone-devel mailing list
> Monotone-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/monotone-devel

___
Monotone-devel mailing list
Monotone-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: [Monotone-devel] undoing commits

2019-08-04 Thread Ludovic Brenta

Le 2019-08-04 23:45, Hendrik Boom a écrit :

I committed two revisions on the main branch of development that should
have been made on a new branch. (just to be awkward, some of those
edits should have been made on the main branch and others not.  Each
revision is a mixed bag)

How can I recover?

Isn't there some way to remove recent commits as long as they haven't
sync'd to any other data base?

Because I checked the copy of the data base on the server, and they 
don't

seem to have gotten there yet.

So maybe I can check out the recent committed revisions (elsewhere, as
backups), revert those commits, and then hand-edit the changes back
that should have been on the main branch, subsequently start a new
branch, and then and edit the new-branch changes back onto the new
branch.

Does this sound practical?  Anyone have a better idea?  Or an obvious
gotcha?

My alternative would seem to be more drastic: delete the local database
altogether, copy an old version of it from the server, and try to
recover from there.


I would use SQL commands to delete the branch certs on the two offending
revisions.  This would prevent them from being synced to other 
databases.

Of course, prior to doing that, revert any working trees to an ancestor
revision.

--
Ludovic Brenta.

___
Monotone-devel mailing list
Monotone-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/monotone-devel


[Monotone-devel] undoing commits

2019-08-04 Thread Hendrik Boom
I committed two revisions on the main branch of development that should
have been made on a new branch. (just to be awkward, some of those 
edits should have been made on the main branch and others not.  Each 
revision is a mixed bag)

How can I recover?

Isn't there some way to remove recent commits as long as they haven't
sync'd to any other data base?

Because I checked the copy of the data base on the server, and they don't
seem to have gotten there yet.

So maybe I can check out the recent committed revisions (elsewhere, as 
backups), revert those commits, and then hand-edit the changes back 
that should have been on the main branch, subsequently start a new 
branch, and then and edit the new-branch changes back onto the new 
branch.

Does this sound practical?  Anyone have a better idea?  Or an obvious 
gotcha?

My alternative would seem to be more drastic: delete the local database 
altogether, copy an old version of it from the server, and try to 
recover from there.

-- hendrik

___
Monotone-devel mailing list
Monotone-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/monotone-devel