Questions in this catagory:
I removed my working directory by accident or instead of checking in. How can I fix it?
When running vadvance, I get the error "vadvance: filename is too big"
How can I create a new package with an initial skeleton version?
- When trying to create a package, I get an error that the parent directory "does not have type package-parent"
vcreate will only let you create a package in a directory that has an attribute that means "It's OK to create packages here". This is intended to protect against people accidentally creating packages in places they shouldn't.
You can add this attribute to a directory at any time with "vattrib -a type package-parent directory".When creating directories in the repository which you want to contain packages, you should use "vmkdir -p directory-name", as it automatically does this step for you, as well as creating the directory.
Note that if you're using multiple repositories, you need to pay attention to which repository needs the attribute. The type attribute must include the value package-parent at the master repository of the directory you're trying to create a package inside of. The error message from vcreate will indicate which repository is missing the attribute:
vcreate: /vesta/example.com/foo/bar at vesta2.ca.example.com:21776 does not have type package-parent
vattrib -R vesta2.ca.example.com:21776 -a type package-parent /vesta/example.com/foo/bar
Note also that vcreate will skip this sanity check if you give it the -f flag. Of course there's usually no reason to skip this check, and if a directory really is intended as a container for packages you should add the attribute.
- I checked something out by accident. Can I undo it?
Not exactly. When you check out a package, you reserve the next version (unless you use vcheckout's "-N" option). There's no way to "unreserve" the new version.
What you can do is check in exactly what you checked out. You can do this with "vcheckin -c 0".- I removed my working directory by accident or instead of checking in. How can I fix it?
(Maybe you mistakenly thought your working directory was for a non-exclusive checkout?)
If you want to re-create your work-dir and keep editing, see RepositoryTricks/LinkSessionToNewWork
You can still check in as long as you can find the session directory for your checkout. Suppose the package is /vesta/example.com/foo and your checkout had reserved the new version /vesta/example.com/foo/5. (If you're not sure, you can use vwhohas to find your reservation.) Then the session directory would be /vesta/example.com/foo/checkout/5. (You can also use vattrib on the reservation to find the session directory.) Once you know the session directory, all you need to do is tell vcheckin that you don't have a working directory and where the session directory is:vcheckin -W -s /vesta/example.com/foo/checkout/5
- I used "mkdir" when I meant "vcreate". How can I fix it?
Just run the vcreate command you should have. vcreate can turn an empty appendable directory into a package.
- I used "vcreate" when I meant "mkdir". How can I fix it?
Technically you don't have to. As described below you can create a package inside another package. A package is also a directory. You might want to remove the checkout subdirectory and the latest links with vrm (though they'll leave behind ghosts).
- Can I have a package with a numerical name?
Yes. The repository won't care. You can make a package named "3" with a version named "foo". (See the "-n" option on the vcheckout(1) man page.)
The use of integer version numbers is just the path of least resistance with the existing repository tools. The Vesta repository and builder aren't fundamentally tied to that way of doing things, although there are a few parts of the implementation that might not work quite as well if you chose a different method. (The vupdate(1) tool comes to mind.) It would be a "small matter of programming" to augment or re-write the repository tools to support alternative methods.- Can I create a package inside an existing package?
Yes. Vesta won't infer anything from how you structure the contents of your repository. The repository acts a lot like a filesystem with only a few special rules such as directories and files that are immutable once created. Though it is not the conventional way of doing things, there's nothing that prevents creating a package inside another package right next to versions, and this won't break the system in any way.
- When running vadvance, I get the error "vadvance: filename is too big"
This is a limit that's there as a sanity check, to help keep people from accidentally checking in huge files that they didn't really mean to check in (e.g core files, log files, etc.). You can override this safety feature by passing the -Z flag to vadvance. (When doing this, you may also want to use "-F -1".) See the man page for vadvance(1) for more details.
Usually this message serves as a useful warning. The most common time to override this safety feature is when constructing or extending a build environment by checking in tool binaries that you intend to run as part of a Vesta build, or other components like 3rd party libraries for which no source is provided.- How can I create a new package with an initial skeleton version?
Use vcreate's "-o" command-line option and give it any existing version as an argument. An exact copy of that version will be used for version 0 of the new package.
- How can I promote a version from a branch to the main line?
Suppose the version you want to promote is /vesta/example.com/foo/pkg/3.bar/5. You can move it to the main line in two steps:
Reserve the next version in the package with vcheckout. Avoid creating either a working directory or a session directory with the -W and -S command-line flags.
% vcheckout -W -S /vesta/example.com/foo/pkg Reserving version /vesta/example.com/foo/pkg/6
Check in by explicitly specifying the new version and the content with the -n and -c command-line flags. Also, tell vcheckin that there's no working directory and no session directory with the -W and -S command-line flags.
% vcheckin -W -S -n /vesta/example.com/foo/pkg/6 \ -c /vesta/example.com/foo/pkg/3.bar/5 Checking in /vesta/example.com/foo/pkg/6
- I tried to use vcheckout's -w flag. Why did it say "/home/jsmith/tmp/vesta is not in the Vesta repository"?
You can change where vcheckout puts your working directory when you perform a checkout by using it's -w flag. However, the working directory you specify must be inside the mutable portion of the Vesta repository (normally /vesta-work). This is because Vesta tracks the changes you make by monitoring filesystem operations in your working directory. It can only do this when it is inside the repository's filesystem. Also, the repository tools record metadata (such as the old version you chekcout is based on) usingattributes on your working directory, which can only be done inside the repository.