Fossil SCM

Referencing a file with an absolute path inside of the repository doesn't work

Closed

b277fe07a0b7eb4… · opened 15 years, 1 month ago

Type
Code_Defect
Priority
Severity
Minor
Resolution
Unable_To_Reproduce
Subsystem
Created
March 11, 2011 9:18 p.m.
% fs di ~user/src/test/foo.txt
fossil: file outside of checkout tree: /home/user/src/test/foo.txt
Exit 1

Super easy to reproduce. Pretty cosmetic, but it'd be nice to see fixed. When using deeply nested directories, this becomes a "nice to have." Using a relative path works:

% fs di ../../../../../foo.txt
# diff output

anonymous claiming to be mgagnon added on 2011-03-11 22:25:16 UTC: Did your test was similar to this?


$ pwd
/home/mgagnon/fossil/fossil-scm/src/asd/fsad/fas/dfa/sdf/asdf/as/dfas/dfa/sdf/asdf/asd/fa/sdfa/sdf/asd/fas/df/asdf/asd/fas/df/asdf/d
$ fossil di ~/fossil/fossil-scm/src/file.c
--- /home/mgagnon/fossil/fossil-scm/src/file.c
+++ /home/mgagnon/fossil/fossil-scm/src/file.c
@@ -537,11 +537,11 @@
   }

   if( nFull<=n || memcmp(g.zLocalRoot, zFull, n) ){
     blob_reset(&full;);
     if( errFatal ){
-      fossil_fatal("file outside of checkout tree: %s", zOrigName);
+      fossil_fatal("file outside of checkout tree: \"%s\", zLocalRoot: \"%s\", zFull: \"%s\"", zOrigName, g.zLocalRoot, zFull);
     }
     return 0;
   }
   blob_append(pOut, &zFull;[n], nFull-n);
   return 1;

It seems to work for me..


anonymous claiming to be seanc added on 2011-03-12 17:18:14 UTC: Nope, most certainly broken. Here, try this:

9:14 sean@somehost-98 % fs info
project-name: <unnamed>
repository:   /Users/sean/src/.fossils/fossil-test-repository
local-root:   /private/tmp/fst/
project-code: 70164ac6b1269749f782f3dfce03f9cae7fc0c64
server-code:  4d7de95913a31ac17b29e29e96794b42d2575025
checkout:     b006a48a67d94f6acedde8fc26bc44d5ab793b79 2011-03-12 17:04:53 UTC
parent:       72ede87aa33fb39c8fac6c72adb1c5dc69260597 2011-03-12 17:03:15 UTC
tags:         trunk
comment:      files ended up in the wrong dir (user: sean)
9:14 sean@somehost-98 % fs ls
foo/bur/baz/file1.txt
foo/bur/baz/file2.txt
test.sh
9:14 sean@somehost-98 % pwd
/tmp/fst/foo/bur/baz
9:14 sean@somehost-98 % echo asdf >> file1.txt 
9:14 sean@somehost-98 % ll
total 16
-rw-r--r--  1 sean  wheel  11 Mar 12 09:14 file1.txt
-rw-r--r--  1 sean  wheel   6 Mar 12 09:03 file2.txt
9:14 sean@somehost-98 % fs di /tmp/fst/foo/bur/baz/file1.txt 
fossil: file outside of checkout tree: /tmp/fst/foo/bur/baz/file1.txt
Exit 1
9:15 sean@somehost-98 % fs di file1.txt 
--- file1.txt
+++ file1.txt
@@ -1,1 +1,2 @@
 test1
+asdf


anonymous claiming to be mgagnon added on 2011-03-12 18:34:07 UTC: ha, you Are on a Mac and your local dir. is /tmp.

/tmp is a symlink to /private/tmp. Probably that's what cause the problem. This should be fixed on fossil I guess.. but if you try to specify /private/tmp/rest/of/path instead.. it should work..



Comments (1)

system 2 years, 2 months ago

Closing as part of periodic cleanup.

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button