mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
hgsubversion: allow inferring the svn layout from the commit
Reviewed By: mitrandir77 Differential Revision: D15206676 fbshipit-source-id: fc7604bfa2df9cd1d47e4a5d582f0efe80339531
This commit is contained in:
parent
3f3e91d339
commit
29e1278187
@ -370,6 +370,11 @@ configitem("hgsubversion", "revmapimpl", default=configitem.dynamicdefault)
|
||||
# real default is 'auto'
|
||||
configitem("hgsubversion", "layout", default=configitem.dynamicdefault)
|
||||
|
||||
# Skips the validation of Subversion layout inferred from a commit against the
|
||||
# layout configured for the repository while updating the revmap for that
|
||||
# commit. The layout inferred from the commit is used for the update.
|
||||
configitem("hgsubversion", "usecommitlayout", default=False)
|
||||
|
||||
# real default is True
|
||||
configitem("hgsubversion", "defaultauthors", default=configitem.dynamicdefault)
|
||||
# real default is False
|
||||
|
@ -209,6 +209,10 @@ def _buildmeta(ui, repo, args, partial=False, skipuuid=False):
|
||||
subdir = "/" + subdir
|
||||
if subdir and subdir[-1] == "/":
|
||||
subdir = subdir[:-1]
|
||||
|
||||
if ui.configbool("hgsubversion", "usecommitlayout"):
|
||||
meta.layout = meta.layout_from_commit(subdir, revpath, ctx.branch())
|
||||
else:
|
||||
assert revpath.startswith(subdir), (
|
||||
"That does not look like the " "right location in the repo."
|
||||
)
|
||||
@ -520,7 +524,7 @@ def svn(ui, repo, subcommand, *args, **opts):
|
||||
ui.status("Bad arguments for subcommand %s\n" % subcommand)
|
||||
else:
|
||||
raise
|
||||
except KeyError as e:
|
||||
except KeyError:
|
||||
tb = traceback.extract_tb(sys.exc_info()[2])
|
||||
if len(tb) == 1:
|
||||
ui.status("Unknown subcommand %s\n" % subcommand)
|
||||
|
@ -95,6 +95,7 @@ New errors are not allowed. Warnings are strongly discouraged.
|
||||
undocumented: hgsubversion.stupid (bool)
|
||||
undocumented: hgsubversion.tunnels (list)
|
||||
undocumented: hgsubversion.unsafeskip (list)
|
||||
undocumented: hgsubversion.usecommitlayout (bool)
|
||||
undocumented: hgsubversion.username (str)
|
||||
undocumented: infinitepush.bgssh (str)
|
||||
undocumented: infinitepush.bundle-stream (bool)
|
||||
|
Loading…
Reference in New Issue
Block a user