Rev 1112: Use variable names closer matching upstream. in http://people.samba.org/bzr/jelmer/bzr-svn/cext
Jelmer Vernooij
jelmer at samba.org
Sat Jun 21 16:57:19 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/cext
------------------------------------------------------------
revno: 1112
revision-id: jelmer at samba.org-20080621155718-4fd2z70okm8h99qc
parent: jelmer at samba.org-20080621155705-8nnz24s1a5euihs7
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: cext
timestamp: Sat 2008-06-21 17:57:18 +0200
message:
Use variable names closer matching upstream.
modified:
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
=== modified file '__init__.py'
--- a/__init__.py 2008-06-19 14:03:32 +0000
+++ b/__init__.py 2008-06-21 15:57:18 +0000
@@ -85,7 +85,7 @@
def check_subversion_version():
try:
- import core
+ from bzrlib.plugins.svn import core
except:
warning("Unable to load bzr-svn extensions - did you build it?")
=== modified file 'fetch.py'
--- a/fetch.py 2008-06-19 15:16:59 +0000
+++ b/fetch.py 2008-06-21 15:57:18 +0000
@@ -368,7 +368,7 @@
def change_prop(self, name, value):
if name == properties.PROP_EXECUTABLE:
# You'd expect executable to match
- # constants.PROP_EXECUTABLE_VALUE, but that's not
+ # properties.PROP_EXECUTABLE_VALUE, but that's not
# how SVN behaves. It appears to consider the presence
# of the property sufficient to mark it executable.
self.is_executable = (value != None)
@@ -376,6 +376,8 @@
self.is_symlink = (value != None)
elif name == properties.PROP_ENTRY_COMMITTED_REV:
self.last_file_rev = int(value)
+ elif name == properties.PROP_EXTERNALS:
+ mutter('svn:externals property on file!')
elif name in (properties.PROP_ENTRY_COMMITTED_DATE,
properties.PROP_ENTRY_LAST_AUTHOR,
properties.PROP_ENTRY_LOCK_TOKEN,
@@ -384,8 +386,6 @@
pass
elif name.startswith(properties.PROP_WC_PREFIX):
pass
- elif name == properties.PROP_EXTERNALS:
- mutter('svn:externals property on file!')
elif (name.startswith(properties.PROP_PREFIX) or
name.startswith(SVN_PROP_BZR_PREFIX)):
mutter('unsupported file property %r', name)
=== modified file 'workingtree.py'
--- a/workingtree.py 2008-06-19 15:45:18 +0000
+++ b/workingtree.py 2008-06-21 15:57:18 +0000
@@ -108,16 +108,16 @@
self._control_files = LockableFiles(control_transport, 'lock', LockDir)
def get_ignore_list(self):
- ignore_globs = set([get_adm_dir()])
- ignore_globs.update(ignores.get_runtime_ignores())
- ignore_globs.update(ignores.get_user_ignores())
+ ignores = set([get_adm_dir()])
+ ignores.update(get_runtime_ignores())
+ ignores.update(get_user_ignores())
def dir_add(wc, prefix, patprefix):
ignorestr = wc.prop_get(properties.PROP_IGNORE,
self.abspath(prefix).rstrip("/"))
if ignorestr is not None:
for pat in ignorestr.splitlines():
- ignore_globs.add(urlutils.joinpath(patprefix, pat))
+ ignores.add(urlutils.joinpath(patprefix, pat))
entries = wc.entries_read(False)
for entry in entries:
@@ -136,13 +136,13 @@
finally:
subwc.close()
- adm = self._get_wc()
+ wc = self._get_wc()
try:
- dir_add(adm, "", ".")
+ dir_add(wc, "", ".")
finally:
wc.close()
- return ignore_globs
+ return ignores
def is_control_filename(self, path):
return is_adm_dir(path)
@@ -322,7 +322,7 @@
# FIXME: Generate more random file ids
return ("NEW-" + escape_svn_path(entry.url[len(entry.repos):].strip("/")), None)
- def add_dir_to_inv(relpath, adm, parent_id):
+ def add_dir_to_inv(relpath, wc, parent_id):
assert isinstance(relpath, unicode)
entries = wc.entries_read(False)
entry = entries[""]
@@ -388,7 +388,7 @@
newrev = self.branch.repository.get_revision(revid)
newrevtree = self.branch.repository.revision_tree(revid)
- def update_settings(adm, path):
+ def update_settings(wc, path):
id = newrevtree.inventory.path2id(path)
mutter("Updating settings for %r", id)
revnum = self.branch.lookup_revision_id(
@@ -407,7 +407,8 @@
if entry == "":
continue
- subwc = WorkingCopy(wc, os.path.join(self.basedir, path, entry))
+ subwc = WorkingCopy(wc, os.path.join(self.basedir, path, entry),
+ write_lock=True)
try:
update_settings(subwc, os.path.join(path, entry))
finally:
@@ -436,7 +437,7 @@
todo = []
file_path = os.path.abspath(file_path)
f = self.relpath(file_path)
- adm = self._get_wc(os.path.dirname(f), write_lock=True)
+ wc = self._get_wc(os.path.dirname(f), write_lock=True)
try:
if not self.inventory.has_filename(f):
if save:
@@ -471,7 +472,7 @@
ids = iter(ids)
assert isinstance(files, list)
for f in files:
- adm = self._get_wc(os.path.dirname(f), write_lock=True)
+ wc = self._get_wc(os.path.dirname(f), write_lock=True)
try:
try:
wc.add(os.path.join(self.basedir, f))
@@ -523,11 +524,11 @@
path = self._inventory.id2path(file_id)
return osutils.fingerprint_file(open(self.abspath(path)))['sha1']
- def _change_fileid_mapping(self, id, path, adm=None):
- if adm is None:
+ def _change_fileid_mapping(self, id, path, wc=None):
+ if wc is None:
subwc = self._get_wc(write_lock=True)
else:
- subwc = adm
+ subwc = wc
new_entries = self._get_new_file_ids(subwc)
if id is None:
if new_entries.has_key(path):
@@ -545,7 +546,7 @@
return self.branch.repository.branchprop_list.get_properties(
self.branch.get_branch_path(self.base_revnum), self.base_revnum)
- def _get_new_file_ids(self, adm):
+ def _get_new_file_ids(self, wc):
committed = self._get_base_branch_props().get(SVN_PROP_BZR_FILEIDS, "")
existing = wc.prop_get(SVN_PROP_BZR_FILEIDS, self.basedir)
if existing is None or committed == existing:
@@ -564,7 +565,7 @@
def set_pending_merges(self, merges):
"""See MutableTree.set_pending_merges()."""
- adm = self._get_wc(write_lock=True)
+ wc = self._get_wc(write_lock=True)
try:
# Set bzr:merge
if len(merges) > 0:
@@ -600,7 +601,7 @@
def pending_merges(self):
merged = self._get_bzr_merges(self._get_base_branch_props()).splitlines()
- adm = self._get_wc()
+ wc = self._get_wc()
try:
merged_data = wc.prop_get(
SVN_PROP_BZR_ANCESTRY+str(self.branch.mapping.scheme), self.basedir)
@@ -703,7 +704,7 @@
except SubversionException, (msg, ERR_WC_UNSUPPORTED_FORMAT):
raise UnsupportedFormatError(msg, kind='workingtree')
try:
- self.svn_url = adm.entry(self.local_path, True).url
+ self.svn_url = wc.entry(self.local_path, True).url
finally:
wc.close()
More information about the bazaar-commits
mailing list