Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Michai Ramakers <m.ramakers-Re5JQEeQqe8AvxtiuMwx3w <at> public.gmane.org>
Subject: commits not seen on 2nd local worktree unless forcing initial commit
Newsgroups: gmane.comp.version-control.fossil-scm.user
Date: Tuesday 22nd July 2014 09:35:40 UTC (over 3 years ago)
Hello,

while toying around with Andy Bradford's fix/analysis, found something
else, which seems related to the no-initial-commit feature which is
recent default in trunk.

(FWIW, I know there have been flaws in this area before, and although
I am not a dev having/willing to deal with them, I agree with Jan that
'bugs happen', and a feature uncovering bugs or even introducing new
ones is not necessarily bad for that reason alone, if it eventually
results in a cleaner design. I don't know how well initial-commit-less
repos work with older fossil-versions, but I assume that has been
discussed or considered in detail elsewhere. )

Here are 2 typescripts; the first witout empty initial commit, and the
latter with forced initial commit. Everything is cleaned up in between
the 2 sessions.

In both cases, a repo is created, and it is opened as-is in 2
workdirs. A file is then added in workdir 'b', and an update is done
is workdir 'a'. In the first example, the update is not seen; in the
2nd example, everything is OK:

---( without initial commit: )---

/tmp$ mkdir f
/tmp$ cd f
/tmp/f$ f new f.f
project-id: bf874a5a154d7e572d99464d602a42bcb0dcf4bf
server-id:  c9f88d8904cedc4b7932c7c9832c3db8b6760d74
admin-user: michai (initial password is "7dfb91")
/tmp/f$ mkdir a b
/tmp/f$ cd a
/tmp/f/a$ f open ../f.f
project-name: 
repository:   /tmp/f/a/../f.f
local-root:   /tmp/f/a/
config-db:    /home/michai/.fossil
project-code: bf874a5a154d7e572d99464d602a42bcb0dcf4bf
checkins:     0
/tmp/f/a$ cd ../b
/tmp/f/b$ f open ../f.f
project-name: 
repository:   /tmp/f/b/../f.f
local-root:   /tmp/f/b/
config-db:    /home/michai/.fossil
project-code: bf874a5a154d7e572d99464d602a42bcb0dcf4bf
checkins:     0
/tmp/f/b$ f tim
+++ no more data (0) +++
/tmp/f/b$ date > thefile
/tmp/f/b$ f add thefile
ADDED  thefile
/tmp/f/b$ f ci -m test thefile
New_Version: c3450bfdff913112f6121b145540aa669d99e8eb
/tmp/f/b$ cd ../a
/tmp/f/a$ f up
/tmp/f/a$ f tim
=== 2014-07-22 ===
09:20:06 [c3450bfdff] test (user: michai tags: trunk)
+++ no more data (1) +++
/tmp/f/a$ ls
/tmp/f/a$

---( with forced initial commit: )---

/tmp$ mkdir f
/tmp$ cd f
/tmp/f$ date
Tue Jul 22 11:22:04 CEST 2014
/tmp/f$ f new --date-override 2014-01-01 f.f
project-id: 1f87142730004196e2388d27d2514fd06e8d9539
server-id:  b2b51507887bf5e0e0f9b899298f8d2ecc67c258
admin-user: michai (initial password is "a1757a")
/tmp/f$ mkdir a b
/tmp/f$ cd a
/tmp/f/a$ f open ../f.f
project-name: 
repository:   /tmp/f/a/../f.f
local-root:   /tmp/f/a/
config-db:    /home/michai/.fossil
project-code: 1f87142730004196e2388d27d2514fd06e8d9539
checkout:     b58cc4d9818973107a8acba469dda6edd4ba9683 2014-01-01 00:00:00
UTC
leaf:         open
tags:         trunk
comment:      initial empty check-in (user: michai)
checkins:     1
/tmp/f/a$ cd ../b
/tmp/f/b$ f open ../f.f
project-name: 
repository:   /tmp/f/b/../f.f
local-root:   /tmp/f/b/
config-db:    /home/michai/.fossil
project-code: 1f87142730004196e2388d27d2514fd06e8d9539
checkout:     b58cc4d9818973107a8acba469dda6edd4ba9683 2014-01-01 00:00:00
UTC
leaf:         open
tags:         trunk
comment:      initial empty check-in (user: michai)
checkins:     1
/tmp/f/b$ date > thefile
/tmp/f/b$ f add thefile
ADDED  thefile
/tmp/f/b$ f ci -m test thefile
New_Version: 4b720ef5510056c9ab365389e1bed9a6af78004b
/tmp/f/b$ cd ../a
/tmp/f/a$ f up
ADD thefile
-------------------------------------------------------------------------------
updated-to:   4b720ef5510056c9ab365389e1bed9a6af78004b 2014-07-22 09:22:41
UTC
leaf:         open
tags:         trunk
comment:      test (user: michai)
changes:      1 file modified.
 "fossil undo" is available to undo changes to the working checkout.
/tmp/f/a$ f tim
=== 2014-07-22 ===
09:22:41 [4b720ef551] *CURRENT* test (user: michai tags: trunk)
=== 2014-01-01 ===
00:00:00 [b58cc4d981] initial empty check-in (user: michai tags: trunk)
+++ no more data (2) +++
/tmp/f/a$ ls
thefile
/tmp/f/a$

---

The order of opening/committing are important; if the commit from
workdir 'b' happens before the repo is opened in workdir 'a',
everything seems to work OK.

In the 1st session (without initial empty commit), more commits can be
done from dir 'b', but these are not seen when updating in dir 'a'
afterwards. The timeline in workdir 'a' does show the commits.

hth,
Michai
 
CD: 3ms