English 中文(简体)
Renaming directories with the Fossil DVCS
原标题:
  • 时间:2009-12-15 14:30:32
  •  标签:
  • dvcs
  • fossil

Is it possible to rename directories with Fossil? I ve tried the obvious command:

fossil mv oldname newname

Fossil then informs me that it has done something:

RENAME oldname newname

However, calling "fossil changes" results in an empty list. As far as I can tell, renaming directories is either not supported, not yet implemented or just broken. Is there a trick to this?

最佳回答

After some research I ve found that it can be done, but it is counter-intuitive. Fossil doesn t really care what happens to directories; all it cares about is the location of the files within them.

When renaming a directory, Fossil appears to:

  • loop through the repository s list of files for the old directory;
  • locate the file in the new directory on the filesystem;
  • update the files metadata so that they are listed as being part of the new directory.

If the new directory does not exist, this fails. There are no files in the new location so Fossil cannot match up the old with the new, so no changes are made.

In short: You must rename the folder via the filesystem before you try to make the change to Fossil. If you don t, Fossil ignores you.

Now that I think about it, this makes sense, though I d prefer it if Fossil would just update the filesystem itself instead of forcing a two-step process on its users.

As an addendum, it appears to be impossible to add an empty directory to Fossil. I assume that internally it stores just files; folders are considered to be metadata. An empty folder is metadata describing nothing, so adding them makes no sense.

问题回答

暂无回答




相关问题
bzr init-repo and multiple projects

I m having difficulties understanding bzr init-repo. I have 3 projects that I want to have in their own isolated repository, in subversion I would use svnadmin create three times to create them. Like ...

How suitable is a DVCS for the corporate environment?

I ve been using SVN for some time now, and am pretty happy with how it works (but I can t say I m an expert, and I haven t really done much with branches and merging). However an opportunity has ...

Renaming directories with the Fossil DVCS

Is it possible to rename directories with Fossil? I ve tried the obvious command: fossil mv oldname newname Fossil then informs me that it has done something: RENAME oldname newname However, ...

Distributed source control for VisualWorks Smalltalk

One of the annoying things about Smalltalk is that it (usually) requires its own VCS, due to the way that it manages its source code. Squeak and Gemstone (at least in its GLASS version) have a DVCS ...

Can I clone part of a Mercurial repository?

Is it possible to clone part of a Mercurial repository? Let s say the repository is quite large, or contains multiple projects, or multiple branches. Can I clone only part of the repository? E.g. in ...

How does git track source code moved between files?

Apparently, when you move a function from one source code file to another, the git revision log (for the new file) can show you where that code fragment was originally coming from (see for example the ...

热门标签