Re: [fossil-users] VCS Theory

2015-11-20 Thread Richard Hipp
On 11/19/15, Scott Doctor  wrote:
> I am looking for information about the theory of VCS that is
> being used for systems such as Fossil, Git... Not so much the
> how-to-use, but the concepts and issues.
>
> Any suggestions of either links to something like wikipedia
> pages or a well written book I can find at the university library.
>

Is something like http://soundsoftware.ac.uk/why-version-control what
you are looking for?

-- 
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] VCS Theory

2015-11-20 Thread Konstantin Khomoutov
On Thu, 19 Nov 2015 11:51:41 -0800
Scott Doctor  wrote:

> I am looking for information about the theory of VCS that is 
> being used for systems such as Fossil, Git... Not so much the 
> how-to-use, but the concepts and issues.
> 
> Any suggestions of either links to something like wikipedia 
> pages or a well written book I can find at the university library.

I'd honestly start with "The Git Parable" [1].  It's very entry-level
graceful introduction to the core ideas behind a DVCS, and it's not
really Git-specific.
Then you may consider reading [2].  This text *is* Git-specific but
the basic idea of data handling is delivered rather well.

1. http://tom.preston-werner.com/2009/05/19/the-git-parable.html
2. https://jwiegley.github.io/git-from-the-bottom-up/
___
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] VCS Theory

2015-11-20 Thread Joerg Sonnenberger
On Thu, Nov 19, 2015 at 11:51:41AM -0800, Scott Doctor wrote:
> I am looking for information about the theory of VCS that is being used for
> systems such as Fossil, Git... Not so much the how-to-use, but the concepts
> and issues.

Both TLA and Darcs had quite a bit of write up when I looked a decade
ago.

Joerg
___
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 before update

2015-11-20 Thread Stephan Beal
On Fri, Nov 20, 2015 at 8:37 PM, Eduard 
wrote:

> Hi,
>
> I would like to have a way to review the diff of all changes that have
> been made between the current checkout and the tip of the current branch
> before running "fossil update".
>

fossil pull
fossil diff

ought to do it. Then, after reviewing:

fossil update


> Is there a way of specifying the commit to which "fossil update" would
> update to?


fossil update UUID-or-TAG

where TAG=tip of a branch


> version is used, if there is only a single leaf.", so is there an alias
> for that (like "current" or "next")? Note that this is not the same as
> running "fossil update branch", because that would bring you to the
> latest commit tagged with "branch".
>

Correct, but UUID won't.

fossil doesn't have ultra-flexible git-like addressibility. There are a
couple aliases, like 'prev', but they cannot address a branch other than
the one which is currently checked out. Continually typing "fossil update
prev" will eventually take you back to the start of the current branch.

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

2015-11-20 Thread Stephan Beal
On Fri, Nov 20, 2015 at 8:55 PM, Eduard 
wrote:

> On 11/20/2015 02:42 PM, Stephan Beal wrote:
>
> Is there a way of specifying the commit to which "fossil update" would
>> update to?
>
>
> fossil update UUID-or-TAG
>
> Sorry, I think I haven't been very clear. My question is rather, is there
> an alias with the meaning "whatever commit 'fossil update' would update to
> if I ran it right now"?
>

That alias is the name of the current branch (which you seem to want to
avoid, though i'm not sure why).

fossil pull

will sync any remote changes without applying them, then you can:

fossil diff [--branch TAG]

will show you changes against the tip of that branch (which is what
'update' would update you to).

If, however, autosync is on, then there is a window of time where 'diff'
and 'update' may show different things because someone can commit to the
remote repo between your 'diff' and 'update'.


> I could of course do this by parsing the output of "fossil update
> --dry-run" and then running "fossil diff --from current --to $UUID", but
> I'm wondering if there's a built-in way of doing it without resorting to
> shell scripts.
>

'update' will always take the tip unless told otherwise, which seems to me
to be what you want to diff against? If you'll disable autosync (which
isn't generally recommended) you can avoid any sort of race condition
between diff and update, and then simply rely on the 'default to tip'
behaviour.

Or am i misunderstanding what you want to do?

-- 
- 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] VCS Theory

2015-11-20 Thread bch
On 11/20/15, Joerg Sonnenberger  wrote:
> On Thu, Nov 19, 2015 at 11:51:41AM -0800, Scott Doctor wrote:
>> I am looking for information about the theory of VCS that is being used
>> for
>> systems such as Fossil, Git... Not so much the how-to-use, but the
>> concepts
>> and issues.
>
> Both TLA and Darcs had quite a bit of write up when I looked a decade
> ago.

+1 for the Darcs literature.

> Joerg
> ___
> 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] diff before update

2015-11-20 Thread jungle Boogie
On 20 November 2015 at 11:37, Eduard  wrote:
> I would like to have a way to review the diff of all changes that have
> been made between the current checkout and the tip of the current branch
> before running "fossil update".

have you tried fossil changes?
http://fossil-scm.org/index.html/help?cmd=changes




-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
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 before update

2015-11-20 Thread Eduard
Hi,

I would like to have a way to review the diff of all changes that have
been made between the current checkout and the tip of the current branch
before running "fossil update".

Is there a way of specifying the commit to which "fossil update" would
update to? The documentation to "update" says "If the VERSION argument
is omitted, then the leaf of the subtree that begins at the current
version is used, if there is only a single leaf.", so is there an alias
for that (like "current" or "next")? Note that this is not the same as
running "fossil update branch", because that would bring you to the
latest commit tagged with "branch".

Thanks,
Eduard




signature.asc
Description: OpenPGP digital signature
___
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 before update

2015-11-20 Thread Eduard
Hi Stephan,

Thanks for your reply!

On 11/20/2015 02:42 PM, Stephan Beal wrote:
>
> Is there a way of specifying the commit to which "fossil update" would
> update to? 
>
>
> fossil update UUID-or-TAG
Sorry, I think I haven't been very clear. My question is rather, is
there an alias with the meaning "whatever commit 'fossil update' would
update to if I ran it right now"?

I could of course do this by parsing the output of "fossil update
--dry-run" and then running "fossil diff --from current --to $UUID", but
I'm wondering if there's a built-in way of doing it without resorting to
shell scripts.

Thanks,
Eduard



signature.asc
Description: OpenPGP digital signature
___
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 before update

2015-11-20 Thread Eduard
On 11/20/2015 03:10 PM, Stephan Beal wrote:
> On Fri, Nov 20, 2015 at 8:55 PM, Eduard  > wrote:
>
> On 11/20/2015 02:42 PM, Stephan Beal wrote:
>>
>> Is there a way of specifying the commit to which "fossil
>> update" would
>> update to? 
>>
>>
>> fossil update UUID-or-TAG
> Sorry, I think I haven't been very clear. My question is rather,
> is there an alias with the meaning "whatever commit 'fossil
> update' would update to if I ran it right now"?
>
>
> That alias is the name of the current branch (which you seem to want
> to avoid, though i'm not sure why).
I'm trying to avoid it because the two disagree if there are multiple
independent branches that share the same name. Example:

$ f status
repository:   snip/fossil.fossil
local-root:   snip/
config-db:snip/.fossil
checkout: f0de41fd5ed81cf91953e30fe5ca9e057aed2d34 2014-01-09
05:56:05 UTC
parent:   cbcd7056b6c3cba36c8cac8385d23517222116f3 2014-01-08
11:38:20 UTC
child:d83fc58dead2d03428a763b0890b8b5fbffb7957 2014-01-09
13:17:23 UTC
tags: pending-review
comment:  Attempts to add files outside the open checkout tree
result in fatal error.
  (user: andybradford)
$ f up -n   
UPDATE src/add.c
---
updated-to:   d83fc58dead2d03428a763b0890b8b5fbffb7957 2014-01-09
13:17:23 UTC
tags: pending-review
comment:  Add comments to better explain what it happening for the
out-of-tree check
  in the "add" command. (user: drh)
changes:  1 file modified.
$ f up -n pending-review
(snip)
---
updated-to:   2a1d7e0efc0f048b495815bac577d3c0f5c4d9a6 2015-10-20
08:14:11 UTC
tags: pending-review
comment:  Docker build "release" by default. Meant for upcoming
Fossil release. (user:
  jan.nijtmans)
changes:  322 files modified.
$

> fossil pull
>
> will sync any remote changes without applying them, then you can:
>
> fossil diff [--branch TAG]
>
> will show you changes against the tip of that branch (which is what
> 'update' would update you to).
I'm actually not exactly sure what that does. (The documentation isn't
very clear about it.) But it's again not equivalent to what update would
do in the above scenario:
$ f diff --from current --to d83fc58dead2d03428a763b0890b8b5fbffb7957 |
grep '+++'
+++ src/add.c
$ f diff --branch pending-review | grep '+++'  
+++ Dockerfile
+++ src/info.c
+++ src/timeline.c

Again, I should have explained better. I want the diff between the
current checkout (or even whatever commit the current checkout is based
on) and what "fossil up" would update me to. The point is to have a
quick glance at whatever everyone else did before updating (because
maybe they introduced a really obvious bug, or maybe they inserted
malicious code). This is the main reason why I don't use autosync;
because then I would have to remember what the last commit I trust was,
and then "fossil diff --from ${last_trusted_commit} --to current".
> If, however, autosync is on, then there is a window of time where
> 'diff' and 'update' may show different things because someone can
> commit to the remote repo between your 'diff' and 'update'.
>  
>
> I could of course do this by parsing the output of "fossil update
> --dry-run" and then running "fossil diff --from current --to
> $UUID", but I'm wondering if there's a built-in way of doing it
> without resorting to shell scripts.
>
>
> 'update' will always take the tip unless told otherwise, which seems
> to me to be what you want to diff against? If you'll disable autosync
> (which isn't generally recommended) you can avoid any sort of race
> condition between diff and update, and then simply rely on the
> 'default to tip' behaviour.
It depends what you mean by "tip" (whether it's the latest commit with a
certain tag, or whether it's the latest commit with a certain tag /that
is a direct descendant of the current commit/).

Best,
Eduard


signature.asc
Description: OpenPGP digital signature
___
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 before update

2015-11-20 Thread Eduard
On 11/20/2015 04:06 PM, Stephan Beal wrote:
>  
>
> $ f status
> tags: pending-review
>   (user: andybradford)
> $ f up -n   
> UPDATE src/add.c
> 
> ---
> updated-to:   d83fc58dead2d03428a763b0890b8b5fbffb7957 2014-01-09
> 13:17:23 UTC
> tags: pending-review
> comment:  Add comments to better explain what it happening for
> the out-of-tree check
>   in the "add" command. (user: drh)
> changes:  1 file modified.
> $ f up -n pending-review
> updated-to:   2a1d7e0efc0f048b495815bac577d3c0f5c4d9a6 2015-10-20
> 08:14:11 UTC
> tags: pending-review
> comment:  Docker build "release" by default. Meant for
> upcoming Fossil release. (user:
>   jan.nijtmans)
> changes:  322 files modified.
>
>
> Aha, now i see the problem. i don't have a solution. In such a crazy
> case, using the UUID is really the only sane choice.
So uh is there any chance of adding an alias for this (@drh)? It's easy
to write a shell script that does it, but it seems to me that this is
something that should really be within fossil itself (since not every
fossil user necessarily knows how to write shell scripts).

Best,
Eduard


signature.asc
Description: OpenPGP digital signature
___
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 before update

2015-11-20 Thread Stephan Beal
On Fri, Nov 20, 2015 at 10:52 PM, Eduard 
wrote:

> On 11/20/2015 04:06 PM, Stephan Beal wrote:
>
>
>>
>> $ f status
>> tags: pending-review
>>   (user: andybradford)
>> $ f up -n
>> UPDATE src/add.c
>>
>> ---
>> updated-to:   d83fc58dead2d03428a763b0890b8b5fbffb7957 2014-01-09
>> 13:17:23 UTC
>> tags: pending-review
>> comment:  Add comments to better explain what it happening for the
>> out-of-tree check
>>   in the "add" command. (user: drh)
>> changes:  1 file modified.
>> $ f up -n pending-review
>> updated-to:   2a1d7e0efc0f048b495815bac577d3c0f5c4d9a6 2015-10-20
>> 08:14:11 UTC
>> tags: pending-review
>> comment:  Docker build "release" by default. Meant for upcoming
>> Fossil release. (user:
>>   jan.nijtmans)
>> changes:  322 files modified.
>>
>
> Aha, now i see the problem. i don't have a solution. In such a crazy case,
> using the UUID is really the only sane choice.
>
> So uh is there any chance of adding an alias for this (@drh)? It's easy to
> write a shell script that does it, but it seems to me that this is
> something that should really be within fossil itself (since not every
> fossil user necessarily knows how to write shell scripts).
>

i don't think an alias is needed - simply leave out the branch name when
you do 'update' (or pass the name 'current'). Then, according to the
code-level docs, if you leave out a name or use 'current', it will look for
a direct ancestor. Try it with 'current' and see if that solves your case.

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

2015-11-20 Thread Stephan Beal
On Fri, Nov 20, 2015 at 9:53 PM, Eduard 
wrote:

> On 11/20/2015 03:10 PM, Stephan Beal wrote:
>
> That alias is the name of the current branch (which you seem to want to
> avoid, though i'm not sure why).
>
> I'm trying to avoid it because the two disagree if there are multiple
> independent branches that share the same name.
>

Aha. But nobody would do such a thing... right? Instead they would re-tag
one of those branches with a different name, thereby solving the various
philosophical problems which arise from such a case. i suspect.


> $ f status
> tags: pending-review
>   (user: andybradford)
> $ f up -n
> UPDATE src/add.c
>
> ---
> updated-to:   d83fc58dead2d03428a763b0890b8b5fbffb7957 2014-01-09 13:17:23
> UTC
> tags: pending-review
> comment:  Add comments to better explain what it happening for the
> out-of-tree check
>   in the "add" command. (user: drh)
> changes:  1 file modified.
> $ f up -n pending-review
> updated-to:   2a1d7e0efc0f048b495815bac577d3c0f5c4d9a6 2015-10-20 08:14:11
> UTC
> tags: pending-review
> comment:  Docker build "release" by default. Meant for upcoming Fossil
> release. (user:
>   jan.nijtmans)
> changes:  322 files modified.
>

Aha, now i see the problem. i don't have a solution. In such a crazy case,
using the UUID is really the only sane choice.


> Again, I should have explained better. I want the diff between the current
> checkout (or even whatever commit the current checkout is based on) and
> what "fossil up" would update me to.
>

fossil up will update you (by default) to the latest checkin on the current
branch. In the case of multiple branches with the same name, i would
_expect_ fossil to know which of those branches you are on and DTRT, but i
don't know that it does (it might remember the name, not the UUID - i don't
recall).


> The point is to have a quick glance at whatever everyone else did before
> updating (because maybe they introduced a really obvious bug, or maybe they
> inserted malicious code). This is the main reason why I don't use autosync;
> because then I would have to remember what the last commit I trust was, and
> then "fossil diff --from ${last_trusted_commit} --to current".
>

Historical anecdote: autosync was added to help avoid forks, as a couple
inadvertent forks were created in the main repo early on (sometimes only a
few short moments apart from each other). In general autosync is A Good
Thing, but yet, it leaves a time window for potentially unexpected
behaviour. That said - i've never had that backfire on me.


> It depends what you mean by "tip" (whether it's the latest commit with a
> certain tag, or whether it's the latest commit with a certain tag *that
> is a direct descendant of the current commit*).
>

That, i don't know off hand. The source code says:

https://www.fossil-scm.org/index.html/artifact/404e7daea8b200e2?ln=186-190

so it seems to be the latter (direct descendant).

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

2015-11-20 Thread Eduard
On 11/20/2015 04:56 PM, Stephan Beal wrote:
> On Fri, Nov 20, 2015 at 10:52 PM, Eduard
> >
> wrote:
>
> On 11/20/2015 04:06 PM, Stephan Beal wrote:
>>  
>>
>> $ f status
>> tags: pending-review
>>   (user: andybradford)
>> $ f up -n   
>> UPDATE src/add.c
>> 
>> ---
>> updated-to:   d83fc58dead2d03428a763b0890b8b5fbffb7957
>> 2014-01-09 13:17:23 UTC
>> tags: pending-review
>> comment:  Add comments to better explain what it
>> happening for the out-of-tree check
>>   in the "add" command. (user: drh)
>> changes:  1 file modified.
>> $ f up -n pending-review
>> updated-to:   2a1d7e0efc0f048b495815bac577d3c0f5c4d9a6
>> 2015-10-20 08:14:11 UTC
>> tags: pending-review
>> comment:  Docker build "release" by default. Meant for
>> upcoming Fossil release. (user:
>>   jan.nijtmans)
>> changes:  322 files modified.
>>
>>
>> Aha, now i see the problem. i don't have a solution. In such a
>> crazy case, using the UUID is really the only sane choice.
> So uh is there any chance of adding an alias for this (@drh)? It's
> easy to write a shell script that does it, but it seems to me that
> this is something that should really be within fossil itself
> (since not every fossil user necessarily knows how to write shell
> scripts).
>
>
> i don't think an alias is needed - simply leave out the branch name
> when you do 'update' (or pass the name 'current'). Then, according to
> the code-level docs, if you leave out a name or use 'current', it will
> look for a direct ancestor. Try it with 'current' and see if that
> solves your case.
The problem lies not with 'update'. The problem is that there's no way
to refer within other commands (specifically 'diff') to the commit that
'update' (with no VERSION argument) would update to. In the above
example, I would like there to be some alias "update-target" that would
resolve to d83fc58dead2d03428a763b0890b8b5fbffb7957 (not actually
suggesting that as a name, there's probably a better name for it), so
that I could do "fossil diff --from current --to update-target".

Best,
Eduard


signature.asc
Description: OpenPGP digital signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users