[Bug 5290] New: hg pull -u -r result leaves confusion
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Fri Jul 8 18:49:39 UTC 2016
https://bz.mercurial-scm.org/show_bug.cgi?id=5290
Bug ID: 5290
Summary: hg pull -u -r result leaves confusion
Product: Mercurial
Version: 3.8.3
Hardware: PC
OS: Mac OS
Status: UNCONFIRMED
Severity: bug
Priority: wish
Component: Mercurial
Assignee: bugzilla at selenic.com
Reporter: chris at infinite.io
CC: mercurial-devel at selenic.com
Howdy. I have an `upstream` repository that has pristine vendor code drops. I
have a `working` repository where I make my own code changes. When the vendor
drops a new version, I update `upstream` and pull it into my `working` repo.
I've noticed a difference in behavior with `hg pull -u -r` versus `hg pull -r;
hg update` (the full commands will follow). This may simply be filed under a
usability issue as opposed to a downright bug.
When I do the -u version, the user isn't notified that there's more to do and
instead files are seemingly replaced wholesale. You might (probably?) notice
your wasted effort once you `hg push`, but I didn't test this.
The shorthand version:
$ hg clone https://localhost/vendor/apache-libcloud
destination directory: apache-libcloud
requesting all changes
adding changesets
adding manifests
adding file changes
added 256 changesets with 2428 changes to 1881 files (+1 heads)
updating to branch default
1859 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd apache-libcloud
$ hg pull -u -r apache-libcloud-1.1.0
https://localhost/vendor/apache-libcloud-upstream
pulling from https://localhost/vendor/apache-libcloud-upstream
searching for changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 447 changes to 447 files (+1 heads)
448 files updated, 0 files merged, 158 files removed, 0 files unresolved
At this point if you start working in `apache-libcloud`, you'll be
none-the-wiser that files were (seemingly) blown away. You need to divine an
`hg merge`.
Compare this to not using the `-u` option.
$ hg pull -r apache-libcloud-1.1.0
https://localhost/vendor/apache-libcloud-upstream
pulling from https://localhost/vendor/apache-libcloud-upstream
searching for changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 447 changes to 447 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)
It's pretty clear (to me) that something more needs to be done.
$ hg merge
merging .hgtags
merging apache_libcloud.egg-info/SOURCES.txt
merging libcloud/common/aws.py
merging libcloud/common/base.py
merging libcloud/common/openstack.py
merging libcloud/common/openstack_identity.py
merging libcloud/httplib_ssl.py
merging libcloud/storage/drivers/s3.py
merging libcloud/storage/providers.py
merging libcloud/storage/types.py
merging libcloud/utils/py3.py
warning: conflicts while merging .hgtags! (edit, then use 'hg resolve --mark')
warning: conflicts while merging libcloud/common/base.py! (edit, then use 'hg
resolve --mark')
warning: conflicts while merging libcloud/httplib_ssl.py! (edit, then use 'hg
resolve --mark')
warning: conflicts while merging libcloud/storage/providers.py! (edit, then use
'hg resolve --mark')
warning: conflicts while merging libcloud/storage/types.py! (edit, then use 'hg
resolve --mark')
436 files updated, 6 files merged, 156 files removed, 5 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list