[fossil-users] Diff after move

2011-09-01 Thread Jacek Cała
  Hi All,

I moved some files from one dir to another and made some changes.
Issuing 'fossil chan' showed me that the files are missing -> correct.
I ran 'fossil mv' on these files and then 'fossil chan' showed that
they're edited -> correct. However, when I try to see the changes
'fossil diff' I get:

fossil.exe: file XXX does not exist in checkin:

Can't say if that matters but all above was after moving my repository
from its original place and issuing 'fossil open
REPO_IN_A_NEW_PLACE.fossil --keep'

I wouldn't like to make commit on my sources until I see the changes,
so any help appreciated

  Regards,
  Jacek
___
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 after move

2011-09-01 Thread Stephan Beal
2011/9/1 Jacek Cała 

> fossil.exe: file XXX does not exist in checkin:
>

You also need to do the mv yourself. fossil mv records the intention but
does not actually perform the mv on the filesystem.


> Can't say if that matters but all above was after moving my repository
> from its original place and issuing 'fossil open
> REPO_IN_A_NEW_PLACE.fossil --keep'
>

That "shouldn't" matter, as long as you re-open after moving your fsl file.


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
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 after move

2011-09-01 Thread Remigiusz Modrzejewski

On Sep 1, 2011, at 5:14 PM, Stephan Beal wrote:

> 2011/9/1 Jacek Cała 
> 
>> fossil.exe: file XXX does not exist in checkin:
>> 
> 
> You also need to do the mv yourself. fossil mv records the intention but
> does not actually perform the mv on the filesystem.

Which, for me, seems to be quite weird...


Kind regards,
Remigiusz Modrzejewski



___
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 after move

2011-09-01 Thread Stephan Beal
2011/9/1 Remigiusz Modrzejewski 

> On Sep 1, 2011, at 5:14 PM, Stephan Beal wrote:
> > You also need to do the mv yourself. fossil mv records the intention but
> > does not actually perform the mv on the filesystem.
>
> Which, for me, seems to be quite weird...
>

i can't argue definitively whether it is The Right Thing To Do or not, but
that's the way fossil behaves. It does seem to cause some confusion, though
- this problem (if that is indeed the OPs actual problem) comes up every now
and then.

Keep in mind that moving files from C code (i.e. fossil) is not. It requires
platform-specific code, directories may have to be created, permissions
might have to be set, etc.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
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 after move

2011-09-01 Thread Stephan Beal
On Thu, Sep 1, 2011 at 5:26 PM, Stephan Beal  wrote:

> Keep in mind that moving files from C code (i.e. fossil) is not. It
> requires
>

"is not trivial"

i meant to say.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
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 after move

2011-09-01 Thread Jacek Cała
Hi Stephan,

Actually, I moved the files. Sorry, forgot to add that my first
'fossil chan' reported some MISSING files which I found after running
'fossil extra'. This allowed me to let fossil know that the files were
moved by running 'fossil mv'. And so this my question: why fossil
can't find them in the new place if I can clearly see they're there?
Also 'fossil ls' shows they're in the new dir.

I suspect that 'fossil diff' tries to search for previous versions in
the new dir instead of the old one. That could explain the problem.

Have anyone seen anything similar?

  Jacek

W dniu 1 września 2011 16:14 użytkownik Stephan Beal
 napisał:
> 2011/9/1 Jacek Cała 
>>
>> fossil.exe: file XXX does not exist in checkin:
>
> You also need to do the mv yourself. fossil mv records the intention but
> does not actually perform the mv on the filesystem.
>
>>
>> Can't say if that matters but all above was after moving my repository
>> from its original place and issuing 'fossil open
>> REPO_IN_A_NEW_PLACE.fossil --keep'
>
> That "shouldn't" matter, as long as you re-open after moving your fsl file.
>
> --
> - stephan beal
> http://wanderinghorse.net/home/stephan/
>
> ___
> 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 after move

2011-09-01 Thread Jacek Cała
Hi again,

I made a test on a simple, one file repository with two dirs:

DirA\file.txt
DirB\

I created a new repo, added DirA/file.txt, commited, made some
changes, moved file to 'DirB', issued 'fossil chan' -> saw the MISSING
file, issued 'fossil extra' -> saw DirB/file.txt. Issued 'fossil mv
DirA/file.txt DirB/file.txt' then 'fossil chan' -> saw EDITED
DirB/file.txt. And, finally, 'fossil diff DirB/file.txt' resulted in
'fossil.exe: file DirB/file.txt does not exist in checkin:'

Looks like a bug in the diff command but please confirm it if you can.
My 'fossil ver' -> 'This is fossil version 1.18 [df9da91ba8]
2011-07-13 23:03:41 UTC'; OS: 'Windows 7 x64'

  Regards,
  Jacek


W dniu 1 września 2011 16:39 użytkownik Jacek Cała
 napisał:
> Hi Stephan,
>
> Actually, I moved the files. Sorry, forgot to add that my first
> 'fossil chan' reported some MISSING files which I found after running
> 'fossil extra'. This allowed me to let fossil know that the files were
> moved by running 'fossil mv'. And so this my question: why fossil
> can't find them in the new place if I can clearly see they're there?
> Also 'fossil ls' shows they're in the new dir.
>
> I suspect that 'fossil diff' tries to search for previous versions in
> the new dir instead of the old one. That could explain the problem.
>
> Have anyone seen anything similar?
>
>  Jacek
>
> W dniu 1 września 2011 16:14 użytkownik Stephan Beal
>  napisał:
>> 2011/9/1 Jacek Cała 
>>>
>>> fossil.exe: file XXX does not exist in checkin:
>>
>> You also need to do the mv yourself. fossil mv records the intention but
>> does not actually perform the mv on the filesystem.
>>
>>>
>>> Can't say if that matters but all above was after moving my repository
>>> from its original place and issuing 'fossil open
>>> REPO_IN_A_NEW_PLACE.fossil --keep'
>>
>> That "shouldn't" matter, as long as you re-open after moving your fsl file.
>>
>> --
>> - stephan beal
>> http://wanderinghorse.net/home/stephan/
>>
>> ___
>> 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 after move

2011-09-01 Thread Martin S. Weber

On 09/01/11 12:00, Jacek Cała wrote:

Hi again,

I made a test on a simple, one file repository with two dirs:

DirA\file.txt
DirB\

I created a new repo, added DirA/file.txt, commited, made some
changes, moved file to 'DirB', issued 'fossil chan' ->  saw the MISSING
file, issued 'fossil extra' ->  saw DirB/file.txt. Issued 'fossil mv
DirA/file.txt DirB/file.txt' then 'fossil chan' ->  saw EDITED
DirB/file.txt. And, finally, 'fossil diff DirB/file.txt' resulted in
'fossil.exe: file DirB/file.txt does not exist in checkin:'


I've also noticed that moved (mv + fossil mv), *empty* files show up as EDITED.

I want to investigate, but I'm out until labor day...

-Martin
___
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 after move

2011-09-01 Thread Stephan Beal
2011/9/1 Jacek Cała 

> DirB/file.txt. And, finally, 'fossil diff DirB/file.txt' resulted in
> 'fossil.exe: file DirB/file.txt does not exist in checkin:'
>
> Looks like a bug in the diff command but please confirm it if you can.
>

i think the message is correct: the file does not exist in the checkIN
because DirB/file.txt has never been committed. It exists in the checkOUT,
but no the checkIN.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
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 after move

2011-09-01 Thread Jacek Cała
Agree, but if there's no way to view the changes, it's still a problem
from the user perspective.

  Jacek

W dniu 1 września 2011 17:16 użytkownik Stephan Beal
 napisał:
> 2011/9/1 Jacek Cała 
>>
>> DirB/file.txt. And, finally, 'fossil diff DirB/file.txt' resulted in
>> 'fossil.exe: file DirB/file.txt does not exist in checkin:'
>>
>> Looks like a bug in the diff command but please confirm it if you can.
>
> i think the message is correct: the file does not exist in the checkIN
> because DirB/file.txt has never been committed. It exists in the checkOUT,
> but no the checkIN.
> --
> - stephan beal
> http://wanderinghorse.net/home/stephan/
>
> ___
> 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 after move

2011-09-01 Thread Konstantin Khomoutov
On Thu, 1 Sep 2011 18:16:07 +0200
Stephan Beal  wrote:

> > DirB/file.txt. And, finally, 'fossil diff DirB/file.txt' resulted in
> > 'fossil.exe: file DirB/file.txt does not exist in checkin:'
> >
> > Looks like a bug in the diff command but please confirm it if you
> > can.
> 
> i think the message is correct: the file does not exist in the checkIN
> because DirB/file.txt has never been committed. It exists in the
> checkOUT, but no the checkIN.
I think that the original poster meant that while the message can be
absolutely correct, this behaviour itself has little sense.
Consider how it's (sensibly) handled by Git:

C:\tmp\foo>git init
Initialized empty Git repository in C:/tmp/foo/.git/

C:\tmp\foo>md a

C:\tmp\foo>md b

C:\tmp\foo>touch a\aaa.txt

C:\tmp\foo>git add a\aaa.txt

C:\tmp\foo>git commit -m "add a\aaa.txt"
[master (root-commit) ec7b3f6] add a\aaa.txt
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 a/aaa.txt

C:\tmp\foo>git mv a\aaa.txt b

C:\tmp\foo>echo test >b\aaa.txt

C:\tmp\foo>git diff b\aaa.txt
diff --git a/b/aaa.txt b/b/aaa.txt
index e69de29..9eb3931 100644
--- a/b/aaa.txt
+++ b/b/aaa.txt
@@ -0,0 +1 @@
+test

C:\tmp\foo>git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD ..." to unstage)
#
#   renamed:a/aaa.txt -> b/aaa.txt
#
# Changes not staged for commit:
#   (use "git add ..." to update what will be committed)
#   (use "git checkout -- ..." to discard changes in working
# directory)
#
#   modified:   b/aaa.txt
#

Two points to note here:
1) `git mv` also moves the file physically.
   Yes, this is debatable, but I think Git does The Right Thing here
   following the principle of least surprise.
2) `git diff` works on the moved file.
   Same here: it's quite sensible for the user to expect the VCS to know
   the file has been renamed and be able co compare its state in the
   "active" check-in with its current on-disk state.
___
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 after move

2011-09-01 Thread Stephan Beal
2011/9/1 Jacek Cała 

> Agree, but if there's no way to view the changes, it's still a problem
> from the user perspective.
>

But how should fossil diff something which (for its purposes) isn't yet
there? Agreed, though, it "could" figure out that file2 was previously
file1, and take a different diff path, but the diff is always 0% or 100%,
depending on how one defines diff to behave in the context of a mv
operation. Neither 0% nor 100% change seems useful to me in the context of a
diff. A mv+edit combination could have a non-0/100% diff, i guess.

Regarding the comparison with git: git tracks changes differently, and can
even tell you that a given commit moved X lines of code from file A to file
B (it's pretty f-ing smart that way). Fossil tracks whole files only.

i unfortunately don't understand the internal details of how fossil tracks
lineage and changes well enough to explain/justify fossil's behaviour, but
this topic as come up before and IIRC (which i won't guaranty!)
the consensus was that fossil's design "doesn't immediately lend well" to
solving that. Or maybe it's just that nobody's pitched in yet to do it.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
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 after move

2011-09-01 Thread Jacek Cała
2011/9/1 Stephan Beal :
> 2011/9/1 Jacek Cała 
>>
>> Agree, but if there's no way to view the changes, it's still a problem
>> from the user perspective.
>
> But how should fossil diff something which (for its purposes) isn't yet
> there? Agreed, though, it "could" figure out that file2 was previously
> file1, and take a different diff path, but the diff is always 0% or 100%,
> depending on how one defines diff to behave in the context of a mv
> operation. Neither 0% nor 100% change seems useful to me in the context of a
> diff.

If fossil can't process the mv+edit combination when diffing neither
it moves files on disk, what is the purpose of mv then?

> A mv+edit combination could have a non-0/100% diff, i guess.

IMHO, this is what user (me) would actually expect.

  Regards,
  Jacek
___
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 after move

2011-09-01 Thread Stephan Beal
2011/9/1 Jacek Cała 

> If fossil can't process the mv+edit combination when diffing neither
> it moves files on disk, what is the purpose of mv then?
>

That seems like a fair question, but i'm not qualified enough to say
anything clever in response :).


> > A mv+edit combination could have a non-0/100% diff, i guess.
>
> IMHO, this is what user (me) would actually expect.
>

Agreed, but i can't say the current behaviour bugs me at all. When i rename
i file i commit it to a clean state then mv+commit it. But that's just a
personal workflow preference, and the above behaviour would arguably be more
intuitive for most users. It's kinda like the "commit --branch ..." vs
"branch new, then commit" question/thread which came up a month or two ago.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
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 after move

2011-09-01 Thread Jacek Cała
  Hello once again,

Having no choice I had to commit the changes without prior view. And
now from the UI I can do the diff as expected and see changes in the
files that were moved.

  Regards,
  Jacek


W dniu 1 września 2011 17:00 użytkownik Jacek Cała
 napisał:
> Hi again,
>
> I made a test on a simple, one file repository with two dirs:
>
> DirA\file.txt
> DirB\
>
> I created a new repo, added DirA/file.txt, commited, made some
> changes, moved file to 'DirB', issued 'fossil chan' -> saw the MISSING
> file, issued 'fossil extra' -> saw DirB/file.txt. Issued 'fossil mv
> DirA/file.txt DirB/file.txt' then 'fossil chan' -> saw EDITED
> DirB/file.txt. And, finally, 'fossil diff DirB/file.txt' resulted in
> 'fossil.exe: file DirB/file.txt does not exist in checkin:'
>
> Looks like a bug in the diff command but please confirm it if you can.
> My 'fossil ver' -> 'This is fossil version 1.18 [df9da91ba8]
> 2011-07-13 23:03:41 UTC'; OS: 'Windows 7 x64'
>
>  Regards,
>  Jacek
>
>
> W dniu 1 września 2011 16:39 użytkownik Jacek Cała
>  napisał:
>> Hi Stephan,
>>
>> Actually, I moved the files. Sorry, forgot to add that my first
>> 'fossil chan' reported some MISSING files which I found after running
>> 'fossil extra'. This allowed me to let fossil know that the files were
>> moved by running 'fossil mv'. And so this my question: why fossil
>> can't find them in the new place if I can clearly see they're there?
>> Also 'fossil ls' shows they're in the new dir.
>>
>> I suspect that 'fossil diff' tries to search for previous versions in
>> the new dir instead of the old one. That could explain the problem.
>>
>> Have anyone seen anything similar?
>>
>>  Jacek
>>
>> W dniu 1 września 2011 16:14 użytkownik Stephan Beal
>>  napisał:
>>> 2011/9/1 Jacek Cała 

 fossil.exe: file XXX does not exist in checkin:
>>>
>>> You also need to do the mv yourself. fossil mv records the intention but
>>> does not actually perform the mv on the filesystem.
>>>

 Can't say if that matters but all above was after moving my repository
 from its original place and issuing 'fossil open
 REPO_IN_A_NEW_PLACE.fossil --keep'
>>>
>>> That "shouldn't" matter, as long as you re-open after moving your fsl file.
>>>
>>> --
>>> - stephan beal
>>> http://wanderinghorse.net/home/stephan/
>>>
>>> ___
>>> 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 after move

2011-09-01 Thread altufaltu
Actually, even if I do dnot do git mv explicitely, but move, rename & edit a 
file, git somehow detectes it automatically! It shows matching percentage in 
git status. I guess it compares missing files with new files to detect file 
moves. Nice work!

> - Original Message -
> From: Konstantin Khomoutov
> Sent: 09/01/11 10:38 PM
> To: fossil-users@lists.fossil-scm.org
> Subject: Re: [fossil-users] Diff after move
> 
> On Thu, 1 Sep 2011 18:16:07 +0200
> Stephan Beal  wrote:
> 
> > > DirB/file.txt. And, finally, 'fossil diff DirB/file.txt' resulted in
> > > 'fossil.exe: file DirB/file.txt does not exist in checkin:'
> > >
> > > Looks like a bug in the diff command but please confirm it if you
> > > can.
> > 
> > i think the message is correct: the file does not exist in the checkIN
> > because DirB/file.txt has never been committed. It exists in the
> > checkOUT, but no the checkIN.
> I think that the original poster meant that while the message can be
> absolutely correct, this behaviour itself has little sense.
> Consider how it's (sensibly) handled by Git:
> 
> C:\tmp\foo>git init
> Initialized empty Git repository in C:/tmp/foo/.git/
> 
> C:\tmp\foo>md a
> 
> C:\tmp\foo>md b
> 
> C:\tmp\foo>touch a\aaa.txt
> 
> C:\tmp\foo>git add a\aaa.txt
> 
> C:\tmp\foo>git commit -m "add a\aaa.txt"
> [master (root-commit) ec7b3f6] add a\aaa.txt
>  0 files changed, 0 insertions(+), 0 deletions(-)
>  create mode 100644 a/aaa.txt
> 
> C:\tmp\foo>git mv a\aaa.txt b
> 
> C:\tmp\foo>echo test >b\aaa.txt
> 
> C:\tmp\foo>git diff b\aaa.txt
> diff --git a/b/aaa.txt b/b/aaa.txt
> index e69de29..9eb3931 100644
> --- a/b/aaa.txt
> +++ b/b/aaa.txt
> @@ -0,0 +1 @@
> +test
> 
> C:\tmp\foo>git status
> # On branch master
> # Changes to be committed:
> #   (use "git reset HEAD ..." to unstage)
> #
> #   renamed:a/aaa.txt -> b/aaa.txt
> #
> # Changes not staged for commit:
> #   (use "git add ..." to update what will be committed)
> #   (use "git checkout -- ..." to discard changes in working
> # directory)
> #
> #   modified:   b/aaa.txt
> #
> 
> Two points to note here:
> 1) `git mv` also moves the file physically.
>Yes, this is debatable, but I think Git does The Right Thing here
>following the principle of least surprise.
> 2) `git diff` works on the moved file.
>Same here: it's quite sensible for the user to expect the VCS to know
>the file has been renamed and be able co compare its state in the
>"active" check-in with its current on-disk state.
> ___
> 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 after move

2011-09-02 Thread Alaric Snell-Pym
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/01/2011 06:17 PM, Stephan Beal wrote:

> Regarding the comparison with git: git tracks changes differently, and can
> even tell you that a given commit moved X lines of code from file A to file
> B (it's pretty f-ing smart that way). Fossil tracks whole files only.
>
> i unfortunately don't understand the internal details of how fossil tracks
> lineage and changes well enough to explain/justify fossil's behaviour, but
> this topic as come up before and IIRC (which i won't guaranty!)
> the consensus was that fossil's design "doesn't immediately lend well" to
> solving that. Or maybe it's just that nobody's pitched in yet to do it.

AIUI, both git and fossil store each commit as a full tree; such
cleverness is purely in the hands of the diff algorithm...

- --
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5gsC0ACgkQRgz/WHNxCGqF2wCfaB8KJO4x6qH5i2RD5IgVt0Iw
zXUAnRdpYBLMjRZpyJ0L7YKHFIsrOczM
=gLts
-END PGP SIGNATURE-
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users