Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EF6D6200CD2 for ; Thu, 27 Jul 2017 17:55:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E5DBA16B01F; Thu, 27 Jul 2017 15:55:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DD2BA16B01C for ; Thu, 27 Jul 2017 17:55:48 +0200 (CEST) Received: (qmail 77718 invoked by uid 500); 27 Jul 2017 15:55:48 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 77708 invoked by uid 99); 27 Jul 2017 15:55:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jul 2017 15:55:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 38AAD180360 for ; Thu, 27 Jul 2017 15:55:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id S0r4pnSUfyNd for ; Thu, 27 Jul 2017 15:55:44 +0000 (UTC) Received: from mail-qt0-f170.google.com (mail-qt0-f170.google.com [209.85.216.170]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 4B1465FB32 for ; Thu, 27 Jul 2017 15:55:39 +0000 (UTC) Received: by mail-qt0-f170.google.com with SMTP id v29so44823199qtv.3 for ; Thu, 27 Jul 2017 08:55:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Z4oyhVRrAecNY3IiqYmCDdNCnB89sVk+Uw6zz/2Iv18=; b=jGzTsisxSKdzzCtUjgMYyJ7E034UbUaEufvu8P2w+DPi80wXFXaQbch/41OtwD5jqX qjHgtHdvlr0f2sOs2cpXpQuvsaZbLsjjPRBpsjBvHWes48IsdVG7AmcaiIvsAtsqbshu Ly+ynWXmAUxPxxxcMqCcxpDfymu97fURL8HROQXzC+ekEgSp6BnPCozQ4DK3Kg3a+jdn emtOie/5Wc0JqdyPup31u5LNuJzAXfAdmwEWfWzZATTXRsRq/9OZguuFOPKOGjW//YAR NuTQ4y2Pjciclit8QbOLgnTud3kwZ/Mb/U5Kp6VdsOlywnzp35Jif7022Hrtz7X4XImD /2lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Z4oyhVRrAecNY3IiqYmCDdNCnB89sVk+Uw6zz/2Iv18=; b=H1cNdP+opbmFFE5TO1g0nPoDztzLS/m6BUtEjxqbIFvkxktCFhW7PNEEqcg2lkZeHE eTLIF5hD3PCrs+QWGbVqOSLriEnGLwBUoaEiNH/fK4d+qBj0SHuZtZ7QxBVjhrDOvabN GEo28Sp/5jB1cDiL7UnaXPzZNItIRfcvkEm+JM6mvQurFL59DMOr2H8eR6shdgFHSXyL /Z9Xwf/kd9JxeR8LoorKlUyv6cuke9Vv/0Y+OZLEV6NSqAxRxEUi0EtX4uZwMwa7Vkyu 7mEFIwQ0K9Yytleu+NZalbUifuRoXJ7M4AhXv/LuWIccFVrjII9WS/XK/QeUHc8wB98t L5Vw== X-Gm-Message-State: AIVw113xb5u+yfzMb4S3GX+7q59eykY1R1fFJu7/RnO9XFFaPVQEhtX3 9A4+XpZA+/kFpW6DXOyGnBCm+Ghuin26 X-Received: by 10.200.5.134 with SMTP id a6mr7050697qth.44.1501170938690; Thu, 27 Jul 2017 08:55:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.44.162 with HTTP; Thu, 27 Jul 2017 08:55:38 -0700 (PDT) In-Reply-To: References: <54ea2280-ee9a-997e-4e57-b7e31dee5f1d@apache.org> <9f0070c3-8f6b-a59a-da42-76e21216251b@apache.org> From: Nathan Hartman Date: Thu, 27 Jul 2017 11:55:38 -0400 Message-ID: Subject: Re: Checkpointing mock-up option 3 (backed by a local repo) To: Subversion Developers Content-Type: multipart/alternative; boundary="089e08e53d598c504705554e9852" archived-at: Thu, 27 Jul 2017 15:55:50 -0000 --089e08e53d598c504705554e9852 Content-Type: text/plain; charset="UTF-8" On Thu, Jul 27, 2017 at 7:56 AM, Julian Foad wrote: > What can we learn from this mock-up? Here are some of my thoughts (snip) > If I checkpoint my changes, do I then want to see 'status' and 'diff' > against the original base or against the checkpoint? Both are useful. > (snip) > Probably 'checkpoint init' should not be needed, and instead running > 'checkpoint save' should initialize the checkpointing repo if not > already done. > > Probably 'checkpoint finish|uninit' should not be needed, and instead > should happen automatically when the user either commits or reverts the > entire set of changes. > Some thoughts (probably too many)... I agree that 'init' and 'finish' should happen automatically. Creation and destruction of a hidden repository (or any data structure) is an implementation detail that could change in the future and should not be leaked. As you've already said, the 'init' should occur the first time a checkpoint operation is done. As for when the 'finish' should occur, that is a question I've been grappling with... I would say, probably not until the results have been squashed and committed. As far as what to name the commands, if the "checkpoint" command is changed to "local" and the "save" subcommand is changed to "commit" then you get: 1. svn local commit 2. svn local revert 3. svn local rollback 4. svn local list|log 5. svn local squash 6. svn commit <--- to the central repository I think users will immediately start getting ideas about what this means. Is that a good thing? It depends on what the goals are for checkpoints, how checkpoints are intended to fit into the larger workflow, and strategy for the future in general. If checkpoints are intended to be merely a convenience with a limited purpose, then I would call the command "checkpoint" and "checkpoint save" to avoid confusion and make documentation, teaching, and learning easier. If checkpoints are intended to have a much wider application, eventually providing an answer to git's/DVCSs' ability to work offline and/or to do personal work on projects to which one lacks commit privileges, then I would use the shorter "local" (unless someone can think of a better, shorter, and more descriptive name) and try to keep the sub-sub-commands as close in semantics and function as possible to Subversion's original command set. Even though the word "local" is technically a command, we pretend it's more of a mode specifier that redirects what would normally be server side operations to the local machine instead. Working on the local machine essentially means working on a private branch. With that in mind, to answer questions such as: whether a status or diff should be against the original base or against the checkpoint, such questions should always be answered consistently with how server side operations are carried out today. Of course, if this feature is supposed to have such broad scope, there is the (not insignificant) issue that users will have immediate sky-high expectations that will take significant additional time and effort to fulfill, so clearly this is not by any means an immediate goal; it's a *possible* future direction, and if that kind of future appeals to enough people, then the present work should try to be compatible with that future by maintaining (to the extent possible) such a parallel between this new "local branching" and the original server-side branching. Some more thoughts... (1) It will eventually be necessary to create a new "URL specifier" or some sort of syntax to direct an operation into the checkpoint repo. This will make it possible to diff between any permutation of working copy, central repository, and local checkpoints, which will be crucial once users begin to use checkpoints as local branches. I can see a use case where a 3-way diff between all three is useful. (2) Once checkpoints are working reliably, I suggest that "svn update" should perform an automatic implicit "checkpoint save" (or whatever the command is called) before attempting to fetch from the repository and merge with the working copy. This will add a big safety net to what can be a dreaded process. If an update turns ugly, you will be able to do that 3-way diff I was just talking about. (3) Eventually, squashing should be optional; that said, it's not feasible to checkout a WC from a trunk that has lots of activity on it, work locally for weeks, and then expect to replay the local commits onto the trunk successfully. So I suggest this alternative: You can checkout a working copy and make as many checkpoints as you want. When ready to commit, one of the following happens: (a) you squash, update, and commit (which will turn into an infinite loop if item #1 above is implemented and update creates a checkpoint... hmmm... not good) (b) you can replay the commits to the server only if no other commits have been made in the meantime (to trunk or whichever directory originates the checkout) (c) you do not wish to squash but further commits have happened in the originating directory on the server, so you have the third option: create a new branch on the server and replay your commits onto that branch I don't know if I'm making any sense here, but the reasoning is this: If you're on the train to work and you make three checkpoints, you can use option (a), squash, update, and commit. If you're working on a private local branch and you make 300 checkpoints, then you can use option (c) to "move" your checkpoints from the local machine to a new branch on the server. This clears the checkpoints from your local machine and brings your WC up to date with the HEAD of that new branch. Now, you can continue working, make 300 more checkpoints, and (since no one else is working in that new branch, (hopefully!!)), you can subsequently use option (b) to continue replaying your checkpoints onto that branch. There was one other thing... Oh yes. For "checkpoint save" or "local commit" or whatever it ends up being called, I suggest ability to specify a log message with -m or -F just like a normal commit. But for a checkpoint, unlike a normal commit, I would make a log message optional; if not provided, one is generated automatically. I think that's about it for now. Hopefully these thoughts are helpful, not overwhelming. ;-) --089e08e53d598c504705554e9852 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Jul 27, 2017 at 7:56 AM, Julian Foad <julianf= oad@apache.org> wrote:
What can we learn from this mock-up? He= re are some of my thoughts
(snip)
= If I checkpoint my changes, do I then want to see 'status' and '= ;diff'
against the original base or against the checkpoint? Both are useful.
(snip)
Probably 'checkpoint init&= #39; should not be needed, and instead running
'checkpoint save' should initialize the checkpointing repo if not already done.

Probably 'checkpoint finish|uninit' should not be needed, and inste= ad
should happen automatically when the user either commits or reverts the
entire set of changes.

Some though= ts (probably too many)...

I agree that 'init&#= 39; and 'finish' should happen automatically. Creation and destruct= ion of a hidden repository (or any data structure) is an implementation det= ail that could change in the future and should not be leaked. As you've= already said, the 'init' should occur the first time a checkpoint = operation is done. As for when the 'finish' should occur, that is a= question I've been grappling with... I would say, probably not until t= he results have been squashed and committed.

As fa= r as what to name the commands, if the "checkpoint" command is ch= anged to "local" and the "save" subcommand is changed t= o "commit" then you get:

1. svn local co= mmit
2. svn local revert
3. svn local rollback
4. svn local list|log
5. svn local squash
6. svn comm= it =C2=A0 <--- to the central repository

I thin= k users will immediately start getting ideas about what this means. Is that= a good thing? It depends on what the goals are for checkpoints, how checkp= oints are intended to fit into the larger workflow, and strategy for the fu= ture in general.

If checkpoints are intended to be= merely a convenience with a limited purpose, then I would call the command= "checkpoint" and "checkpoint save" to avoid confusion = and make documentation, teaching, and learning easier.

=
If checkpoints are intended to have a much wider application, eventual= ly providing an answer to git's/DVCSs' ability to work offline and/= or to do personal work on projects to which one lacks commit privileges, th= en I would use the shorter "local" (unless someone can think of a= better, shorter, and more descriptive name) and try to keep the sub-sub-co= mmands as close in semantics and function as possible to Subversion's o= riginal command set. Even though the word "local" is technically = a command, we pretend it's more of a mode specifier that redirects what= would normally be server side operations to the local machine instead. Wor= king on the local machine essentially means working on a private branch. Wi= th that in mind, to answer questions such as: whether a status or diff shou= ld be against the original base or against the checkpoint, such questions s= hould always be answered consistently with how server side operations are c= arried out today. Of course, if this feature is supposed to have such broad= scope, there is the (not insignificant) issue that users will have immedia= te sky-high expectations that will take significant additional time and eff= ort to fulfill, so clearly this is not by any means an immediate goal; it&#= 39;s a *possible* future direction, and if that kind of future appeals to e= nough people, then the present work should try to be compatible with that f= uture by maintaining (to the extent possible) such a parallel between this = new "local branching" and the original server-side branching.

Some more thoughts...

(1) It= will eventually be necessary to create a new "URL specifier" or = some sort of syntax to direct an operation into the checkpoint repo. This w= ill make it possible to diff between any permutation of working copy, centr= al repository, and local checkpoints, which will be crucial once users begi= n to use checkpoints as local branches. I can see a use case where a 3-way = diff between all three is useful.

(2) Once checkpo= ints are working reliably, I suggest that "svn update" should per= form an automatic implicit "checkpoint save" (or whatever the com= mand is called) before attempting to fetch from the repository and merge wi= th the working copy. This will add a big safety net to what can be a dreade= d process. If an update turns ugly, you will be able to do that 3-way diff = I was just talking about.

(3) Eventually, squashin= g should be optional; that said, it's not feasible to checkout a WC fro= m a trunk that has lots of activity on it, work locally for weeks, and then= expect to replay the local commits onto the trunk successfully. So I sugge= st this alternative: You can checkout a working copy and make as many check= points as you want. When ready to commit, one of the following happens:

=C2=A0 =C2=A0 (a) you squash, update, and commit (whi= ch will turn into an infinite loop if item #1 above is implemented and upda= te creates a checkpoint... hmmm... not good)

=C2= =A0 =C2=A0 (b) you can replay the commits to the server only if no other co= mmits have been made in the meantime (to trunk or whichever directory origi= nates the checkout)

=C2=A0 =C2=A0 (c) you do not w= ish to squash but further commits have happened in the originating director= y on the server, so you have the third option: create a new branch on the s= erver and replay your commits onto that branch

I d= on't know if I'm making any sense here, but the reasoning is this: = If you're on the train to work and you make three checkpoints, you can = use option (a), squash, update, and commit. If you're working on a priv= ate local branch and you make 300 checkpoints, then you can use option (c) = to "move" your checkpoints from the local machine to a new branch= on the server. This clears the checkpoints from your local machine and bri= ngs your WC up to date with the HEAD of that new branch. Now, you can conti= nue working, make 300 more checkpoints, and (since no one else is working i= n that new branch, (hopefully!!)), you can subsequently use option (b) to c= ontinue replaying your checkpoints onto that branch.

There was one other thing... Oh yes. For "checkpoint save" or = "local commit" or whatever it ends up being called, I suggest abi= lity to specify a log message with -m or -F just like a normal commit. But = for a checkpoint, unlike a normal commit, I would make a log message option= al; if not provided, one is generated automatically.

I think that's about it for now. Hopefully these thoughts are helpfu= l, not overwhelming. ;-)

--089e08e53d598c504705554e9852--