Mercurial > hg > hgforest
changeset 26:6db2e2e67ae5
snapshot: update existing but do not add new path aliases
When 'fsnap' updates a snapshot file, it now only updates existing
path aliases.
We can still create a snapshot with all the path aliases for each
repository by not passing a snapshot file to update in argument.
author | Robin Farine <robin.farine@terminus.org> |
---|---|
date | Mon, 06 Nov 2006 16:52:33 +0100 |
parents | 2d991bfffb86 |
children | f0a9e7f6b7d1 |
files | forest.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/forest.py Fri Nov 03 13:21:48 2006 +0000 +++ b/forest.py Mon Nov 06 16:52:33 2006 +0100 @@ -107,7 +107,7 @@ def update(self, rev, paths): self.rev = rev for name, path in paths.items(): - if not self.paths.has_key(name): + if self.paths.has_key(name): self.paths[name] = path def write(self, ui, section): @@ -172,8 +172,10 @@ """Update a snapshot by scanning a forest. If the ForestSnapshot instance to update was initialized from - a snapshot file, this regenerate the list of trees with their - current revisions but existing path aliases are not touched. + a snapshot file, this regenerates the list of trees with their + current revisions but does not add any path alias to updated + tree entries. Newly created tree entries get all the path aliases + from the corresponding repository. """ rootmap = {}