[cig-commits] commit: snapshot: update existing but do not add new path aliases
Mercurial
hg at geodynamics.org
Mon Nov 24 11:26:54 PST 2008
changeset: 25:363fd78db7ce
parent: 22:086224c65d7e
user: Robin Farine <robin.farine at terminus.org>
date: Mon Nov 06 16:52:33 2006 +0100
files: forest.py
description:
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.
diff -r 086224c65d7e -r 363fd78db7ce forest.py
--- a/forest.py Tue Oct 31 10:14:48 2006 -0800
+++ b/forest.py Mon Nov 06 16:52:33 2006 +0100
@@ -104,7 +104,7 @@ class ForestSnapshot(object):
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):
@@ -169,8 +169,10 @@ class ForestSnapshot(object):
"""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 = {}
More information about the CIG-COMMITS
mailing list