Artifact 421096bb587e540c44f08991990bf52e06f48415:
File
www/cmd_ls.wiki
part of check-in
[1eb067d456]
- Adjust some wikilinks, clean up main ref page, add "new" command.
by
kejoki on
2008-12-12 21:55:46.
0000: 3c 68 32 3e 6c 73 3c 2f 68 32 3e 0a 0a 54 68 65 <h2>ls</h2>..The
0010: 20 3c 63 6f 64 65 3e 6c 73 3c 2f 63 6f 64 65 3e <code>ls</code>
0020: 3c 61 20 68 72 65 66 3d 22 23 6e 6f 74 65 73 22 <a href="#notes"
0030: 3e 2a 3c 2f 61 3e 20 63 6f 6d 6d 61 6e 64 20 69 >*</a> command i
0040: 73 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 61 6c 2c s informational,
0050: 20 69 74 20 64 6f 65 73 6e 27 74 20 64 6f 20 61 it doesn't do a
0060: 6e 79 74 68 69 6e 67 20 74 6f 0a 61 20 63 68 65 nything to.a che
0070: 63 6b 65 64 2d 6f 75 74 20 70 72 6f 6a 65 63 74 cked-out project
0080: 2c 20 62 75 74 20 69 74 20 74 65 6c 6c 73 20 79 , but it tells y
0090: 6f 75 20 73 6f 6d 65 74 68 69 6e 67 20 61 62 6f ou something abo
00a0: 75 74 20 69 74 2e 0a 0a 41 20 70 72 6f 6a 65 63 ut it...A projec
00b0: 74 20 63 6f 6e 73 69 73 74 73 20 6f 66 20 61 20 t consists of a
00c0: 22 73 6f 75 72 63 65 20 74 72 65 65 22 20 6f 66 "source tree" of
00d0: 20 22 61 72 74 69 66 61 63 74 73 22 20 28 73 65 "artifacts" (se
00e0: 65 20 5b 2e 2f 63 6f 6e 63 65 70 74 73 2e 77 69 e [./concepts.wi
00f0: 6b 69 20 7c 20 46 6f 73 73 69 6c 20 63 6f 6e 63 ki | Fossil conc
0100: 65 70 74 73 5d 2e 29 0a 46 72 6f 6d 20 61 20 70 epts].).From a p
0110: 72 61 63 74 69 63 61 6c 20 73 74 61 6e 64 70 6f ractical standpo
0120: 69 6e 74 20 74 68 69 73 20 69 73 20 61 20 73 65 int this is a se
0130: 74 20 6f 66 20 66 69 6c 65 73 20 61 6e 64 20 64 t of files and d
0140: 69 72 65 63 74 6f 72 69 65 73 20 72 6f 6f 74 65 irectories roote
0150: 64 0a 61 74 20 61 20 6d 61 69 6e 20 70 72 6f 6a d.at a main proj
0160: 65 63 74 20 64 69 72 65 63 74 6f 72 79 2e 20 20 ect directory.
0170: 54 68 65 20 66 69 6c 65 73 20 74 68 61 74 20 61 The files that a
0180: 72 65 20 75 6e 64 65 72 20 73 6f 75 72 63 65 20 re under source
0190: 63 6f 6e 74 72 6f 6c 20 61 72 65 6e 27 74 0a 70 control aren't.p
01a0: 61 72 74 69 63 75 6c 61 72 6c 79 20 64 69 73 74 articularly dist
01b0: 69 6e 67 75 69 73 68 61 62 6c 65 20 66 72 6f 6d inguishable from
01c0: 20 74 68 6f 73 65 20 74 68 61 74 20 61 72 65 6e those that aren
01d0: 27 74 2e 20 20 54 68 65 20 3c 63 6f 64 65 3e 6c 't. The <code>l
01e0: 73 3c 2f 63 6f 64 65 3e 20 61 6e 64 0a 3c 63 6f s</code> and.<co
01f0: 64 65 3e 65 78 74 72 61 3c 2f 63 6f 64 65 3e 20 de>extra</code>
0200: 63 6f 6d 6d 61 6e 64 73 20 70 72 6f 76 69 64 65 commands provide
0210: 20 74 68 69 73 20 69 6e 66 6f 72 6d 61 74 69 6f this informatio
0220: 6e 2e 0a 0a 3c 63 6f 64 65 3e 66 6f 73 73 69 6c n...<code>fossil
0230: 20 6c 73 3c 2f 63 6f 64 65 3e 20 70 72 6f 64 75 ls</code> produ
0240: 63 65 73 20 61 20 6c 69 73 74 69 6e 67 20 6f 66 ces a listing of
0250: 20 74 68 65 20 66 69 6c 65 73 20 77 68 69 63 68 the files which
0260: 20 61 72 65 20 75 6e 64 65 72 20 73 6f 75 72 63 are under sourc
0270: 65 0a 63 6f 6e 74 72 6f 6c 20 3c 69 3e 61 6e 64 e.control <i>and
0280: 3c 2f 69 3e 20 74 68 65 69 72 20 73 74 61 74 75 </i> their statu
0290: 73 20 77 69 74 68 69 6e 20 74 68 65 20 72 65 70 s within the rep
02a0: 6f 73 69 74 6f 72 79 2e 20 20 54 68 65 20 6f 75 ository. The ou
02b0: 74 70 75 74 20 69 73 20 61 20 73 69 6d 70 6c 65 tput is a simple
02c0: 0a 6c 69 73 74 20 6f 66 20 53 54 41 54 55 53 2f .list of STATUS/
02d0: 66 69 6c 65 70 61 74 68 20 70 61 69 72 73 20 6f filepath pairs o
02e0: 6e 20 73 65 70 61 72 61 74 65 20 6c 69 6e 65 73 n separate lines
02f0: 2e 20 20 54 68 65 20 73 74 61 74 75 73 20 6f 66 . The status of
0300: 20 61 20 66 69 6c 65 20 77 69 6c 6c 0a 6c 69 6b a file will.lik
0310: 65 6c 79 20 62 65 20 6f 6e 65 20 6f 66 20 41 44 ely be one of AD
0320: 44 45 44 2c 20 55 4e 43 48 41 4e 47 45 44 2c 20 DED, UNCHANGED,
0330: 55 50 44 41 54 45 44 2c 20 6f 72 20 44 45 4c 45 UPDATED, or DELE
0340: 54 45 44 2e 20 3c 61 20 68 72 65 66 3d 22 23 6e TED. <a href="#n
0350: 6f 74 65 73 22 3e 2a 3c 2f 61 3e 0a 0a 49 74 27 otes">*</a>..It'
0360: 73 20 69 6d 70 6f 72 74 61 6e 74 20 74 6f 20 72 s important to r
0370: 65 61 6c 69 7a 65 20 74 68 61 74 20 74 68 69 73 ealize that this
0380: 20 69 73 20 74 68 65 20 73 74 61 74 75 73 20 3c is the status <
0390: 69 3e 72 65 6c 61 74 69 76 65 20 74 6f 20 74 68 i>relative to th
03a0: 65 20 72 65 70 6f 73 69 74 6f 72 79 3c 2f 69 3e e repository</i>
03b0: 2c 0a 69 74 27 73 20 74 68 65 20 73 74 61 74 75 ,.it's the statu
03c0: 73 20 61 73 20 3c 62 3e 66 6f 73 73 69 6c 3c 2f s as <b>fossil</
03d0: 62 3e 20 73 65 65 73 20 69 74 20 61 6e 64 20 68 b> sees it and h
03e0: 61 73 20 6e 6f 74 68 69 6e 67 20 74 6f 20 64 6f as nothing to do
03f0: 20 77 69 74 68 0a 66 69 6c 65 73 79 73 74 65 6d with.filesystem
0400: 20 73 74 61 74 75 73 2e 20 20 49 66 20 79 6f 75 status. If you
0410: 27 72 65 20 6e 65 77 20 74 6f 20 73 6f 75 72 63 're new to sourc
0420: 65 2d 6d 61 6e 61 67 65 6d 65 6e 74 2f 76 65 72 e-management/ver
0430: 73 69 6f 6e 2d 63 6f 6e 74 72 6f 6c 0a 73 79 73 sion-control.sys
0440: 74 65 6d 73 2c 20 79 6f 75 27 6c 6c 20 70 72 6f tems, you'll pro
0450: 62 61 62 6c 79 20 67 65 74 20 62 69 74 20 62 79 bably get bit by
0460: 20 74 68 69 73 20 63 6f 6e 63 65 70 74 2d 62 75 this concept-bu
0470: 67 20 61 74 20 6c 65 61 73 74 20 6f 6e 63 65 2e g at least once.
0480: 0a 0a 54 6f 20 72 65 61 6c 6c 79 20 73 65 65 20 ..To really see
0490: 74 68 65 20 64 69 66 66 65 72 65 6e 63 65 2c 20 the difference,
04a0: 69 73 73 75 65 20 61 6e 20 3c 63 6f 64 65 3e 6c issue an <code>l
04b0: 73 3c 2f 63 6f 64 65 3e 20 62 65 66 6f 72 65 20 s</code> before
04c0: 61 6e 64 20 61 66 74 65 72 20 64 6f 69 6e 67 0a and after doing.
04d0: 61 20 5b 2e 2f 63 6d 64 5f 63 6f 6d 6d 69 74 2e a [./cmd_commit.
04e0: 77 69 6b 69 20 7c 20 3c 63 6f 64 65 3e 63 6f 6d wiki | <code>com
04f0: 6d 69 74 3c 2f 63 6f 64 65 3e 5d 2e 20 20 42 65 mit</code>]. Be
0500: 66 6f 72 65 2c 20 74 68 65 20 73 74 61 74 75 73 fore, the status
0510: 20 6f 66 20 66 69 6c 65 73 20 6d 61 79 20 62 65 of files may be
0520: 20 61 6e 79 20 6f 66 20 74 68 65 20 74 68 72 65 any of the thre
0530: 65 2c 0a 62 75 74 20 61 66 74 65 72 20 3c 63 6f e,.but after <co
0540: 64 65 3e 63 6f 6d 6d 69 74 3c 2f 63 6f 64 65 3e de>commit</code>
0550: 74 69 6e 67 20 63 68 61 6e 67 65 73 20 74 68 65 ting changes the
0560: 20 73 74 61 74 75 73 20 77 69 6c 6c 20 62 65 20 status will be
0570: 55 4e 43 48 41 4e 47 45 44 20 22 61 63 72 6f 73 UNCHANGED "acros
0580: 73 0a 74 68 65 20 62 6f 61 72 64 2e 22 0a 0a 42 s.the board."..B
0590: 79 20 77 61 79 20 6f 66 20 65 78 61 6d 70 6c 65 y way of example
05a0: 2c 20 68 65 72 65 27 73 20 77 68 61 74 20 49 20 , here's what I
05b0: 73 65 65 20 69 66 20 49 20 3c 63 6f 64 65 3e 66 see if I <code>f
05c0: 6f 73 73 69 6c 20 6c 73 3c 2f 63 6f 64 65 3e 20 ossil ls</code>
05d0: 69 6e 20 74 68 65 0a 64 69 72 65 63 74 6f 72 79 in the.directory
05e0: 20 77 68 65 72 65 20 49 20 68 61 76 65 20 63 68 where I have ch
05f0: 65 63 6b 65 64 20 6f 75 74 20 6d 79 20 74 65 73 ecked out my tes
0600: 74 69 6e 67 20 72 65 70 6f 73 69 74 6f 72 79 3a ting repository:
0610: 0a 3c 6e 6f 77 69 6b 69 3e 3c 70 72 65 3e 0a 20 .<nowiki><pre>.
0620: 20 20 20 24 20 66 6f 73 73 69 6c 20 6c 73 0a 20 $ fossil ls.
0630: 20 20 20 41 44 44 45 44 20 20 20 20 20 66 65 65 ADDED fee
0640: 67 62 6f 69 6e 67 0a 20 20 20 20 55 4e 43 48 41 gboing. UNCHA
0650: 4e 47 45 44 20 66 6f 73 73 69 6c 5f 64 6f 63 73 NGED fossil_docs
0660: 2e 74 78 74 0a 20 20 20 20 44 45 4c 45 54 45 44 .txt. DELETED
0670: 20 20 20 6e 69 62 63 72 6f 64 0a 3c 2f 70 72 65 nibcrod.</pre
0680: 3e 3c 2f 6e 6f 77 69 6b 69 3e 0a 42 75 74 20 69 ></nowiki>.But i
0690: 66 20 49 20 64 6f 20 61 20 73 69 6d 70 6c 65 20 f I do a simple
06a0: 6c 73 2c 20 77 68 61 74 20 49 20 67 65 74 20 69 ls, what I get i
06b0: 73 0a 3c 6e 6f 77 69 6b 69 3e 3c 70 72 65 3e 0a s.<nowiki><pre>.
06c0: 20 20 20 20 24 20 6c 73 0a 20 20 20 20 66 65 65 $ ls. fee
06d0: 67 62 6f 69 6e 67 20 20 66 6f 73 73 69 6c 5f 64 gboing fossil_d
06e0: 6f 63 73 2e 74 78 74 20 20 6d 61 6e 69 66 65 73 ocs.txt manifes
06f0: 74 2e 75 75 69 64 20 20 6e 6f 6f 64 6c 65 2e 74 t.uuid noodle.t
0700: 78 74 0a 20 20 20 20 5f 46 4f 53 53 49 4c 5f 20 xt. _FOSSIL_
0710: 20 20 6d 61 6e 69 66 65 73 74 20 20 20 20 20 20 manifest
0720: 20 20 20 6e 69 62 63 72 6f 64 0a 3c 2f 70 72 65 nibcrod.</pre
0730: 3e 3c 2f 6e 6f 77 69 6b 69 3e 0a 0a 54 68 65 20 ></nowiki>..The
0740: 3c 63 6f 64 65 3e 6c 73 3c 2f 63 6f 64 65 3e 20 <code>ls</code>
0750: 63 6f 6d 6d 61 6e 64 20 69 73 20 61 6c 6d 6f 73 command is almos
0760: 74 2c 20 62 75 74 20 6e 6f 74 20 71 75 69 74 65 t, but not quite
0770: 20 65 6e 74 69 72 65 6c 79 2c 20 74 68 65 20 65 entirely, the e
0780: 78 61 63 74 0a 6f 70 70 6f 73 69 74 65 20 6f 66 xact.opposite of
0790: 20 74 68 65 0a 5b 2e 2f 63 6d 64 5f 65 78 74 72 the.[./cmd_extr
07a0: 61 2e 77 69 6b 69 20 7c 20 3c 63 6f 64 65 3e 65 a.wiki | <code>e
07b0: 78 74 72 61 3c 2f 63 6f 64 65 3e 20 63 6f 6d 6d xtra</code> comm
07c0: 61 6e 64 5d 2e 0a 0a 3c 61 20 6e 61 6d 65 3d 22 and]...<a name="
07d0: 6e 6f 74 65 73 22 3e 4e 6f 74 65 73 3a 3c 2f 61 notes">Notes:</a
07e0: 3e 0a 20 20 2a 20 20 49 66 20 79 6f 75 20 63 6f >. * If you co
07f0: 6d 65 20 66 72 6f 6d 20 74 68 65 20 3c 62 3e 57 me from the <b>W
0800: 69 6e 64 6f 77 73 3c 2f 62 3e 20 77 6f 72 6c 64 indows</b> world
0810: 2c 20 69 74 20 77 69 6c 6c 20 68 65 6c 70 20 74 , it will help t
0820: 6f 20 6b 6e 6f 77 20 74 68 61 74 20 27 6c 73 27 o know that 'ls'
0830: 20 69 73 20 74 68 65 20 75 73 75 61 6c 20 3c 62 is the usual <b
0840: 3e 75 6e 69 78 3c 2f 62 3e 20 63 6f 6d 6d 61 6e >unix</b> comman
0850: 64 20 66 6f 72 20 6c 69 73 74 69 6e 67 20 61 20 d for listing a
0860: 64 69 72 65 63 74 6f 72 79 2e 0a 20 20 2a 20 20 directory.. *
0870: 54 68 65 72 65 20 61 72 65 20 6d 6f 72 65 20 73 There are more s
0880: 74 61 74 65 73 20 66 6f 72 20 61 20 66 69 6c 65 tates for a file
0890: 20 74 6f 20 62 65 20 69 6e 20 74 68 61 6e 20 74 to be in than t
08a0: 68 6f 73 65 20 6c 69 73 74 65 64 2c 20 69 6e 63 hose listed, inc
08b0: 6c 75 64 69 6e 67 20 4d 49 53 53 49 4e 47 2c 20 luding MISSING,
08c0: 45 44 49 54 45 44 2c 20 52 45 4e 41 4d 45 44 20 EDITED, RENAMED
08d0: 61 6e 64 20 61 20 63 6f 75 70 6c 65 20 6f 66 20 and a couple of
08e0: 6f 74 68 65 72 73 2e 0a 0a 53 65 65 20 61 6c 73 others...See als
08f0: 6f 3a 20 5b 2e 2f 63 6d 64 5f 61 64 64 2e 77 69 o: [./cmd_add.wi
0900: 6b 69 20 7c 20 66 6f 73 73 69 6c 20 61 64 64 5d ki | fossil add]
0910: 2c 0a 5b 2e 2f 72 6d 2e 77 69 6b 69 20 7c 20 66 ,.[./rm.wiki | f
0920: 6f 73 73 69 6c 20 72 6d 5d 2c 0a 5b 2e 2f 63 6d ossil rm],.[./cm
0930: 64 5f 65 78 74 72 61 2e 77 69 6b 69 20 7c 20 66 d_extra.wiki | f
0940: 6f 73 73 69 6c 20 65 78 74 72 61 5d 2c 0a 5b 2e ossil extra],.[.
0950: 2f 63 6d 64 5f 63 6f 6d 6d 69 74 2e 77 69 6b 69 /cmd_commit.wiki
0960: 20 7c 20 66 6f 73 73 69 6c 20 63 6f 6d 6d 69 74 | fossil commit
0970: 5d 2c 0a 5b 2e 2f 63 6f 6e 63 65 70 74 73 2e 77 ],.[./concepts.w
0980: 69 6b 69 20 7c 20 46 6f 73 73 69 6c 20 63 6f 6e iki | Fossil con
0990: 63 65 70 74 73 5d 2c 0a 5b 2e 2f 72 65 66 65 72 cepts],.[./refer
09a0: 65 6e 63 65 2e 77 69 6b 69 20 7c 20 52 65 66 65 ence.wiki | Refe
09b0: 72 65 6e 63 65 5d 0a rence].