[PATCH] 306394 fix (warning, not error, on non-existent file)
Karl Fogel
karl.fogel at canonical.com
Tue Jan 13 21:44:03 GMT 2009
John Arbash Meinel <john at arbash-meinel.com> writes:
> X seems a reasonable alternative for nonexistent. Though I would also
> want to make sure you thought about "bzr status" (without --short) for
> how it would represent these files.
Yes, see below. it was in my original demo.sh script, and I somehow
removed it, d'oh. I've re-added those commands to the script; here is
the output, followed by the new demo.sh (all inline, not attachments):
--------------------------------------------------------------------------
Repository tree (format: pack-0.92)
Location:
shared repository: /home/kfogel/src/bzr/bzr-repo
repository branch: .
added FILE_A
added FILE_B
added FILE_C
added FILE_D
added FILE_E
Committing to: /home/kfogel/src/bzr/bzr-repo/bzr.dev-306394/demo-306394/
added FILE_A
added FILE_B
added FILE_C
added FILE_D
added FILE_E
Committed revision 1.
deleted FILE_E
added FILE_Q
### Try standard 'bzr status --short':
M FILE_B
M FILE_C
-D FILE_E
+N FILE_Q
? UNVERSIONED_BUT_EXISTING
### Try 'bzr status --short NONEXISTENT ':
X NONEXISTENT
### Try 'bzr status --short NONEXISTENT ...others..:
-D FILE_E
M FILE_C
M FILE_B
X NONEXISTENT
### Try 'bzr status --short NONEXISTENT ... ANOTHER_NONEXISTENT ...':
-D FILE_E
M FILE_C
M FILE_B
X ANOTHER_NONEXISTENT
X NONEXISTENT
### Try 'bzr status --short NONEXISTENT A B UNVERSIONED_BUT_EXISTING C D E Q':
? UNVERSIONED_BUT_EXISTING
-D FILE_E
M FILE_C
M FILE_B
X NONEXISTENT
###
### Now do all those same things, but without --short...
###
### Try 'bzr status NONEXISTENT ':
nonexistent:
NONEXISTENT
### Try 'bzr status NONEXISTENT ...others..:
removed:
FILE_E
modified:
FILE_B
FILE_C
nonexistent:
NONEXISTENT
### Try 'bzr status NONEXISTENT ... ANOTHER_NONEXISTENT ...':
removed:
FILE_E
modified:
FILE_B
FILE_C
nonexistent:
ANOTHER_NONEXISTENT
NONEXISTENT
### Try 'bzr status NONEXISTENT A B UNVERSIONED_BUT_EXISTING C D E Q':
removed:
FILE_E
modified:
FILE_B
FILE_C
unknown:
UNVERSIONED_BUT_EXISTING
nonexistent:
NONEXISTENT
--------------------------------------------------------------------------
#!/bin/sh
BZR=/home/kfogel/src/bzr/bzr-repo/bzr.dev-306394/bzr
DIR=./demo-306394
rm -rf ${DIR}
mkdir ${DIR}
cd ${DIR}
${BZR} init
echo "Test file FILE_A." > FILE_A
echo "Test file FILE_B." > FILE_B
echo "Test file FILE_C." > FILE_C
echo "Test file FILE_D." > FILE_D
echo "Test file FILE_E." > FILE_E
${BZR} add FILE_A FILE_B FILE_C FILE_D FILE_E
${BZR} commit -m "Create five files."
echo "Modification to file FILE_B." > FILE_B
echo "Modification to file FILE_C." > FILE_C
${BZR} rm FILE_E
echo "Test file FILE_Q." > FILE_Q
${BZR} add FILE_Q
touch UNVERSIONED_BUT_EXISTING
echo ""
echo "### Try standard 'bzr status --short':"
echo ""
${BZR} status --short
echo ""
echo "### Try 'bzr status --short NONEXISTENT ':"
echo ""
${BZR} status --short NONEXISTENT
echo ""
echo "### Try 'bzr status --short NONEXISTENT ...others..:"
echo ""
${BZR} status --short NONEXISTENT FILE_A FILE_B FILE_C FILE_D FILE_E
echo ""
echo "### Try 'bzr status --short NONEXISTENT ... ANOTHER_NONEXISTENT ...':"
echo ""
${BZR} status --short NONEXISTENT FILE_A FILE_B ANOTHER_NONEXISTENT FILE_C FILE_D FILE_E
echo ""
echo "### Try 'bzr status --short NONEXISTENT A B UNVERSIONED_BUT_EXISTING C D E Q':"
echo ""
${BZR} status --short NONEXISTENT FILE_A FILE_B UNVERSIONED_BUT_EXISTING FILE_C FILE_D FILE_E
echo ""
echo "###"
echo "### Now do all those same things, but without --short..."
echo "###"
echo ""
echo ""
echo "### Try 'bzr status NONEXISTENT ':"
echo ""
${BZR} status NONEXISTENT
echo ""
echo "### Try 'bzr status NONEXISTENT ...others..:"
echo ""
${BZR} status NONEXISTENT FILE_A FILE_B FILE_C FILE_D FILE_E
echo ""
echo "### Try 'bzr status NONEXISTENT ... ANOTHER_NONEXISTENT ...':"
echo ""
${BZR} status NONEXISTENT FILE_A FILE_B ANOTHER_NONEXISTENT FILE_C FILE_D FILE_E
echo ""
echo "### Try 'bzr status NONEXISTENT A B UNVERSIONED_BUT_EXISTING C D E Q':"
echo ""
${BZR} status NONEXISTENT FILE_A FILE_B UNVERSIONED_BUT_EXISTING FILE_C FILE_D FILE_E
More information about the bazaar
mailing list