Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
mercurial-devel
Commits
28eaf6f8
Commit
28eaf6f8
authored
15 years ago
by
Matt Mackall
Browse files
Options
Downloads
Patches
Plain Diff
share: add experimental share extension
parent
971e38a9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hgext/share.py
+31
-0
31 additions, 0 deletions
hgext/share.py
with
31 additions
and
0 deletions
hgext/share.py
0 → 100644
+
31
−
0
View file @
28eaf6f8
# Mercurial extension to provide the 'hg share' command
#
# Copyright 2006, 2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2, incorporated herein by reference.
import
os
from
mercurial.i18n
import
_
from
mercurial
import
hg
,
commands
def
share
(
ui
,
source
,
dest
,
noupdate
=
False
):
"""
create a new shared repository (experimental)
Initialize a new repository and working directory that shares its
history with another repository.
NOTE: actions that change history such as rollback or moving the
source may confuse sharers.
"""
return
hg
.
share
(
ui
,
source
,
dest
,
not
noupdate
)
cmdtable
=
{
"
share
"
:
(
share
,
[(
'
U
'
,
'
noupdate
'
,
None
,
_
(
'
do not create a working copy
'
))],
_
(
'
[-U] SOURCE DEST
'
)),
}
commands
.
norepo
+=
"
share
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment