Testing of new fork notification:

====================================================
Older fossil, no warning whatsoever on overlapping commits (the mechanism
that causes the silent forks):

matt@xena:/mfs/matt/data/fossil-tests$ ./test-forks.sh
project-id: 8fb8e164bea9d46b58a95ac5bf060836832b8904
server-id:  e8a14f9abf390df3193afcbe068fd07be0417bda
admin-user: matt (initial password is "a9edb1")
Repository cloned into test-fork.fossil
Rebuilding repository meta-data...
  100.0% complete...
Extra delta compression...
Vacuuming the database...
project-id: 8fb8e164bea9d46b58a95ac5bf060836832b8904
server-id:  e8a14f9abf390df3193afcbe068fd07be0417bda
admin-user: matt (password is "53a99c")
project-name: <unnamed>
repository:   /mfs/matt/data/fossil-tests/testdir/a/test-fork.fossil
local-root:   /mfs/matt/data/fossil-tests/testdir/a/
config-db:    /home/matt/.fossil
project-code: 8fb8e164bea9d46b58a95ac5bf060836832b8904
checkout:     c21fae55541a749dbce5467eaacd9d9e44487707 2015-04-19 00:13:39
UTC
leaf:         open
tags:         trunk
comment:      initial empty check-in (user: matt)
check-ins:    1
Repository cloned into test-fork.fossil
Rebuilding repository meta-data...
  100.0% complete...
Extra delta compression...
Vacuuming the database...
project-id: 8fb8e164bea9d46b58a95ac5bf060836832b8904
server-id:  e8a14f9abf390df3193afcbe068fd07be0417bda
admin-user: matt (password is "0d551e")
project-name: <unnamed>
repository:   /mfs/matt/data/fossil-tests/testdir/b/test-fork.fossil
local-root:   /mfs/matt/data/fossil-tests/testdir/b/
config-db:    /home/matt/.fossil
project-code: 8fb8e164bea9d46b58a95ac5bf060836832b8904
checkout:     c21fae55541a749dbce5467eaacd9d9e44487707 2015-04-19 00:13:39
UTC
leaf:         open
tags:         trunk
comment:      initial empty check-in (user: matt)
check-ins:    1
ADDED  file1
ADDED  file2
Pull from file:///mfs/matt/data/fossil-tests/testdir/test-fork.fossil
Round-trips: 1   Artifacts sent: 0  received: 0
Pull done, sent: 285  received: 312  ip:
New_Version: f1573535398c039cb180bd5529682496d164f4e3
Pull from file:///mfs/matt/data/fossil-tests/testdir/test-fork.fossil
Round-trips: 1   Artifacts sent: 0  received: 0
Pull done, sent: 285  received: 311  ip:
New_Version: 085dc764e8b6dabb32e4239e64e9c005b9822550
Push to file:///mfs/matt/data/fossil-tests/testdir/test-fork.fossil
Round-trips: 1   Artifacts sent: 2  received: 0
Push done, sent: 492  received: 270  ip:
Push to file:///mfs/matt/data/fossil-tests/testdir/test-fork.fossil
Round-trips: 1   Artifacts sent: 2  received: 0
Push done, sent: 490  received: 270  ip:

====================================================
With new checks we get a nice big WARNING:

matt@xena:/mfs/matt/data/fossil-tests$ ./test-forks.sh
project-id: f7c3a6aee63331ebc36327c70bfa69c2816cfe23
server-id:  025775feeb37807d09a65b396f991e28b6a11408
admin-user: matt (initial password is "931c07")
Repository cloned into test-fork.fossil
Rebuilding repository meta-data...
  100.0% complete...
Extra delta compression...
Vacuuming the database...
project-id: f7c3a6aee63331ebc36327c70bfa69c2816cfe23
server-id:  025775feeb37807d09a65b396f991e28b6a11408
admin-user: matt (password is "188cf7")
project-name: <unnamed>
repository:   /mfs/matt/data/fossil-tests/testdir/a/test-fork.fossil
local-root:   /mfs/matt/data/fossil-tests/testdir/a/
config-db:    /home/matt/.fossil
project-code: f7c3a6aee63331ebc36327c70bfa69c2816cfe23
checkout:     49e4abe1e3c2985c7469aa90b4a798542617d2e0 2015-04-19 00:05:33
UTC
leaf:         open
tags:         trunk
comment:      initial empty check-in (user: matt)
check-ins:    1
Repository cloned into test-fork.fossil
Rebuilding repository meta-data...
  100.0% complete...
Extra delta compression...
Vacuuming the database...
project-id: f7c3a6aee63331ebc36327c70bfa69c2816cfe23
server-id:  025775feeb37807d09a65b396f991e28b6a11408
admin-user: matt (password is "a04435")
project-name: <unnamed>
repository:   /mfs/matt/data/fossil-tests/testdir/b/test-fork.fossil
local-root:   /mfs/matt/data/fossil-tests/testdir/b/
config-db:    /home/matt/.fossil
project-code: f7c3a6aee63331ebc36327c70bfa69c2816cfe23
checkout:     49e4abe1e3c2985c7469aa90b4a798542617d2e0 2015-04-19 00:05:33
UTC
leaf:         open
tags:         trunk
comment:      initial empty check-in (user: matt)
check-ins:    1
ADDED  file1
ADDED  file2
Pull from file:///mfs/matt/data/fossil-tests/testdir/test-fork.fossil
Round-trips: 1   Artifacts sent: 0  received: 0
Pull done, sent: 283  received: 312  ip:
New_Version: 8d908deab0db68c73dec58d792799fa3ccbb9433
Pull from file:///mfs/matt/data/fossil-tests/testdir/test-fork.fossil
Round-trips: 1   Artifacts sent: 0  received: 0
Pull done, sent: 283  received: 312  ip:
New_Version: f6a29b41cc23f3453a7b1baffe11b8180f173427
Push to file:///mfs/matt/data/fossil-tests/testdir/test-fork.fossil
Round-trips: 1   Artifacts sent: 2  received: 0
Push done, sent: 490  received: 270  ip:
Push to file:///mfs/matt/data/fossil-tests/testdir/test-fork.fossil
Round-trips: 1   Artifacts sent: 2  received: 0
Server says: ****** WARNING: a fork has occurred ******
Round-trips: 1   Artifacts sent: 2  received: 0
Push done, sent: 491  received: 319  ip:

====================================================
A simple script to simulate the colliding commits that caused silent forks:

#!/bin/bash

rm -rf testdir

mkdir -p testdir/{a,b}

fossil init testdir/test-fork.fossil

function clone_open () {
  area=$1
  (cd testdir/$area;
   fossil clone file://../test-fork.fossil test-fork.fossil;
   fossil open test-fork.fossil;
   fossil set autosync 0;
   fossil set web firefox)
}

function addfile () {
  area=$1
  fname=$2
  (cd testdir/$area;fossil add $fname)
}

function modfile () {
  area=$1
  fname=$2
  echo $RANDOM|md5sum|awk '{print $1}' > testdir/$area/$fname
}

function pull () {
   area=$1
   (cd testdir/$area;fossil pull)
}

function commit () {
   area=$1
   (cd testdir/$area;fossil commit -m "committed from area $a")
}

function push () {
   area=$1
   (cd testdir/$area;fossil push)
}

# do it

clone_open a
clone_open b

modfile a file1
addfile a file1

modfile b file2
addfile b file2

# commit from a starts
pull a
commit a

# commit from b starts
pull b
commit b

# commit from a completes
push a

# commit from b completes
push b


On Sat, Apr 18, 2015 at 1:16 PM, Scott Robison <sc...@casaderobison.com>
wrote:

> On Sat, Apr 18, 2015 at 12:19 PM, Ron W <ronw.m...@gmail.com> wrote:
>
>> On Sat, Apr 18, 2015 at 7:14 AM, Matt Welland <mattrwell...@gmail.com>
>> wrote:
>>
>>>
>>>
>> #3 was looking problematic, possibly due to philosophy trumping
>>> pragmatism? Might be addressed now?
>>>
>>
>> This is a definition problem.
>>
>> To my thinking, any place a parent commit has 2 or more children on the
>> same branch is a fork. This seems very clear and unambiguous to me. Some
>> think this is too aggressive, so I will grant that closing fork-leaves is
>> sufficient to indicate explicit intent to resolve the fork.
>>
>> As to merging, a "branch-leaf" is not automatically closed by merging it
>> to anther branch, so why would merging automatically do anything to a
>> "fork-leaf" to make it not a fork-leaf?
>>
>
> There is a --integrate switch to the merge command that closes the merged
> branch. Perhaps the addition of an "integrate" command that is essentially
> a merge with that option auto specified might be useful to those whose
> workflows seem to result in forks?
>
> There is also a leaves command, perhaps the addition of a --forks option
> would be useful, and a "forks" command (as has been suggested already) that
> is essentially the same as "leaves --forks". "leaves" by default only shows
> open leaves, but has --all and --closed options to pick other sets of
> leaves that might be useful, as well as --recompute.
>
> --
> Scott Robison
>
>
> _______________________________________________
> 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

Reply via email to